summaryrefslogtreecommitdiff
path: root/django/core/management/__init__.py
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2023-04-13Fixed typo in ManagementUtility.autocomplete()'s docstring.Vitor [Bux]baum
2023-01-18Refs #34233 -- Used @functools.cache.Nick Pope
Python 3.9+ supports @functools.cache as an alias for @functools.lru_cache(maxsize=None).
2022-07-25Removed obsolete note in management.get_commands() docstring.Anders Kaseorg
Commit 901c3708fb8a2e51bddd37358f8e536282a8c266 documented that the return dict could directly include command modules instead of name strings, which was true at the time. However, that possibility was removed in commit 38f1fe3b35c212136d959538a309c33bf2d340a9.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-01-07Refs #32355 -- Removed unnecessary list() calls before reversed() on dictviews.Mariusz Felisiak
Dict and dictviews are iterable in reversed insertion order using reversed() in Python 3.8+.
2021-10-25Fixed #33205 -- Made call_command() raise TypeError when dest with multiple ↵Hasan Ramezani
arguments is passed.
2020-11-10Fixed #32177 -- Made execute_from_command_line() use program name from the ↵William Schwartz
argv argument. This caused crash in environments where sys.argv[0] is incorrectly set to None.
2020-10-30Fixed #32153 -- Fixed management commands when using required list options.Hasan Ramezani
Thanks Mark Gajdosik for the report and initial patch.
2020-09-30Fixed #32047 -- Fixed call_command() crash if a constant option from ↵Hasan Ramezani
required mutually exclusive group is passed in options.
2019-10-15Fixed #30872 -- Improved unknown command message when settings are manually ↵Carlton Gibson
configured.
2019-09-06Fixed #30763 -- Fixed management commands when using required mutually ↵Hasan Ramezani
exclusive groups.
2019-06-28Fixed #30584 -- Fixed management command when using subparsers with dest ↵Hasan Ramezani
parameter.
2019-02-06Fixed #30159 -- Removed unneeded use of OrderedDict.Nick Pope
Dicts preserve order since Python 3.6.
2018-09-28Refs #28909 -- Simplifed code using unpacking generalizations.Sergey Fedoseev
2018-07-18Removed duplicate words in various comments.Mariusz Felisiak
2018-05-14Fixed #29392 -- Disallowed use of abbreviated forms of --settings and ↵Ryan P Kilby
--pythonpath management command options.
2018-04-21Fixed #29295 -- Fixed management command crash when using subparsers.Hasan Ramezani
Thanks Tim Graham for the fix.
2018-03-02Fixed #29133 -- Fixed call_command() crash if a required option is passed in ↵Alex Tomic
options.
2018-02-21Fixed #28398 -- Added suggestions for mistyped management commands.Tom Forbes
2018-01-31Refs #27795 -- Replaced force_text() usage in django.core.management.Jon Dufresne
Use decode() since Popen.communicate() always returns bytes.
2017-12-07Fixed #28791 -- Allowed commands that don't require settings to work if the ↵geekodour
DJANGO_SETTINGS_MODULE doesn't exist.
2017-12-04Fixed #28860 -- Removed unnecessary len() calls.Дилян Палаузов
2017-09-07Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."Tim Graham
This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda because try/except performs better.
2017-08-31Fixed #28524 -- Fixed program name in management commands when using 'python ↵Nick Pope
-m django'.
2017-08-09Fixed argument name in call_command() docstring.Raúl Pedro Fernandes Santos
Follow up to 8f6a1a15516629b30e2fa2c48d5e682f7955868c.
2017-07-29Avoided creation of temporary sets.Sergey Fedoseev
2017-06-28Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().Mads Jensen
2017-06-16Fixed #27787 -- Made call_command() validate the options it receives.Chandrakant Kumar
2017-05-27Fixed #28249 -- Removed unnecessary dict.keys() calls.Jon Dufresne
iter(dict) is equivalent to iter(dict.keys()).
2017-02-22Fixed #27870 -- Cleaned up ManagementUtility.autocomplete().Phil Bazun
2017-02-21Refs #27656 -- Updated django.core docstring verbs according to PEP 257.Anton Samarchyan
2017-01-28Removed obsolete sentence in ManagementUtility docstring.Srinivas Reddy Thatiparthy
2017-01-20Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham
These functions do nothing on Python 3.
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Stopped using django.utils.lru_cache().Aymeric Augustin
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-02Fixed #27522 -- Fixed runserver autoreload when using staticfile's options.Jeroen van Veen
On a SyntaxError, made runserver exit with a stacktrace when using contrib.staticfiles's runserver options such as --nostatic.
2016-09-30Removed unneeded no_settings_commands hardcoded listClaude Paroz
Thanks Tim Graham for the review.
2016-08-08Fixed #26940 -- Removed makemessages from no_settings_commands whitelistClaude Paroz
As makemessages uses several settings for proper run (FILE_CHARSET, LOCALE_PATHS, MEDIA_ROOT, and STATIC_ROOT), we should require settings configuration for this command.
2016-05-11Fixed #26429 -- Added a timestamp to merge migration names.Raphael Gaschignard
This reduces the possibility of a naming conflict, especially after squashing migrations.
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-04-03Merge pull request #6389 from Dunedan/ticket_25420Dunedan
Fixed #25420 -- Documented bash completion exit code behavior.
2016-03-05Fixed #26315 -- Allowed call_command() to accept a Command object as the ↵Jon Dufresne
first argument.
2015-10-18Fixed #25510 -- Allowed runserver to start with incorrect INSTALLED_APPS.Aymeric Augustin
In that case, the content of INSTALLED_APPS will be ignored until it's fixed and the autoreloader kicks in. I confirmed this behavior manually. As explained on the ticket it's hard to write a test for this case
2015-10-03Fixed #25483 -- Allowed passing non-string arguments to call_commandClaude Paroz
Thanks KS Chan for the report and Tim Graham for the review.
2015-09-23Refs #19973 -- Removed optparse support in management commands per ↵Tim Graham
deprecation timeline.
2015-09-09Fixed #25372 -- Fixed autocompletion for options of non-argparse commands.Daniel Hahler
2015-08-29Fixed #24704 -- Made the autoreloader survive SyntaxErrors.Aymeric Augustin
With this change, it's expected to survive anything except errors that make it impossible to import the settings. It's too complex to fallback to a sensible behavior with a broken settings module. Harcoding things about runserver in ManagementUtility.execute is atrocious but it's the only way out of the chicken'n'egg problem: the current implementation of the autoreloader primarily watches imported Python modules -- and then a few other things that were bolted on top of this design -- but we want it to kick in even if the project contains import-time errors and django.setup() fails. At some point we should throw away this code and replace it by an off-the-shelf autoreloader that watches the working directory and re-runs `django-admin runserver` whenever something changes.