Changes between Version 1 and Version 2 of Ticket #26597


Ignore:
Timestamp:
May 8, 2016, 2:18:12 PM (8 years ago)
Author:
Joseph Kahn
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26597 – Description

    v1 v2  
    33Because of the way options are parsed on:
    44https://github.com/django/django/blob/1.8.13/django/core/management/__init__.py#L106-L108
    5 
    6 You can end up with the dictionary returning `.items` back in one of two orders when you pass both `interactive` and `noinput`. Which is what I was doing in a test case.
    75
    86I assume this is present on other management commands, but I have not tested them.
     
    1210`arg_options = {opt_mapping.get(key, key): value for key, value in options.items()}`
    1311can be run as:
    14 `{{'noinput': 'interactive'}.get(key, key): value for key, value in [('verbosity', 0), ('fake', True), ('list', True), ('fake_initial', True), ('app_label', 'tests'), ('noinput', True), ('interactive', False)]}`
    15 or
    16 `{{'noinput': 'interactive'}.get(key, key): value for key, value in [('verbosity', 0), ('fake', True), ('list', True), ('fake_initial', True), ('app_label', 'tests'), ('interactive', False), ('noinput', True)]}`
     12`{{'noinput': 'interactive'}.get(key, key): value for key, value in [('verbosity', 0), ('fake', True), ('list', True), ('fake_initial', True), ('app_label', 'tests'), ('noinput', True)]}`
    1713
    18 leading to `interactive` being False or True, respectively.
     14leading to `interactive` being True.
Back to Top