Changes between Version 1 and Version 2 of Ticket #26597
- Timestamp:
- May 8, 2016, 2:18:12 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26597 – Description
v1 v2 3 3 Because of the way options are parsed on: 4 4 https://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.7 5 8 6 I assume this is present on other management commands, but I have not tested them. … … 12 10 `arg_options = {opt_mapping.get(key, key): value for key, value in options.items()}` 13 11 can 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)]}` 17 13 18 leading to `interactive` being False or True, respectively.14 leading to `interactive` being True.