summaryrefslogtreecommitdiff
path: root/django/core/management/base.py
AgeCommit message (Collapse)Author
2025-12-22Fixed #36376 -- Fixed --no-color for command help in Python 3.14+.Skyiesac
https://github.com/python/cpython/pull/136809 made `color` default to True in ArgumentParser.
2025-11-20Fixed #36321 -- Defaulted suggest_on_error=True in management commands.kihuni
Python 3.15 defaults suggest_on_error=True, but the feature is available from 3.14, so this change opts in earlier. This change can be reverted when Python 3.15 is the minimum supported version.
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2025-01-04Fixed #36056 -- Made OutputWrapper a virtual subclass of TextIOBase.Adam Johnson
This fixes the ignored exception in self._out.flush() from django.core.management.base.OutputWrapper: `ValueError: I/O operation on closed file.`
2024-12-11Fixed #35920 -- Observed requires_system_checks in migrate and runserver.Jacob Walls
Before, the full suite of system checks was run by these commands regardless if requires_system_checks had been overridden. Co-authored-by: Simon Charette <charette.s@gmail.com>
2024-08-23Fixed #35689 -- Handled custom labels in LabelCommand.missing_args_message.Giovanni Fabbretti
2024-05-23Updated the --traceback option help text.Peter Bittner
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-02-03Fixed #34259 -- Passed called_from_command_line to command subparsers.Adam Johnson
2022-06-20Fixed #33657 -- Allowed customizing formatter class of argument parsers.Abhinav Yadav
2022-05-25Renamed wrapped functions to wrapper.Aymeric Augustin
All these functions are wrapping another function. They're the wrapper, while the function they're wrapping is the wrapped.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-02-03Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak
In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
2021-09-20Refs #31546 -- Removed support for boolean values in ↵Mariusz Felisiak
Command.requires_system_checks. Per deprecation timeline.
2021-08-31Fixed #25264 -- Allowed suppressing base command options in --help output.Jan Szoja
This also suppresses -verbosity and --trackback options in the runserver's help.
2020-10-09Fixed #32094 -- Fixed flush() calls on management command self.stdout/err ↵Thomas Riccardi
proxies.
2020-05-21Fixed #31546 -- Allowed specifying list of tags in ↵Hasan Ramezani
Command.requires_system_checks.
2020-04-27Refs #18325 -- Removed unnecessary line endings in management commands.François Freitag
The OutputWrapper automatically adds \n when it’s not present.
2020-04-14Refs #29501 -- Allowed customizing exit status for management commands.Adam Johnson
2020-04-14Refs #29501 -- Simplified BaseCommand.run_from_argv() a bit.Adam Johnson
2020-04-07Fixed #31428 -- Allowed empty message in management command self.stdout/err ↵François Freitag
proxies.
2020-02-07Refs #31055 -- Added --database option to the check management command.Simon Charette
This avoids enabling the ``database`` checks unless they are explicitly requested and allows to disable on a per-alias basis which is required when only creating a subset of the test databases. This also removes unnecessary BaseCommand._run_checks() hook.
2019-08-12Corrected multiple typos.Min ho Kim
2019-04-30Fixed #30418 -- Added --skip-checks management command option.Jon Dufresne
2019-03-30Fixed #30301 -- Removed OutputWrapper.__init__()'s style_func arg.Tim Graham
Unused since 533532302ae842c95cf7294ef6cd7f3e2bfaca65.
2018-10-08Replaced kwargs.pop() with keyword-only arguments.Jon Dufresne
2018-09-11Refs #29560 -- Fixed typo in django/core/management/base.py.Nick Pope
2018-09-11Fixed #29560 -- Added --force-color management command option.Hasan Ramezani
2018-07-02Removed parser.add_arguments() arguments that match the defaults.Claude Paroz
2018-06-16Fixed #29152 -- Allowed passing kwargs to ArgumentParser initialization in ↵humbertotm
management commands.
2018-06-06Fixed #29301 -- Added custom help formatter to BaseCommand classClaude Paroz
This partially reverts c3055242c81812278ebdc93dd109f30d2cbd1610. Thanks Adam Johnson and Carlton Gibson for the reviews.
2018-05-13Fixed #17379 -- Removed management commands deactivation of the locale.Claude Paroz
2018-04-21Fixed #29295 -- Fixed management command crash when using subparsers.Hasan Ramezani
Thanks Tim Graham for the fix.
2018-04-11Fixed #29301 -- Made management command --help display command-specific ↵David Foster
arguments before common arguments.
2017-09-07Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."Tim Graham
This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda because try/except performs better.
2017-06-28Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().Mads Jensen
2017-06-19Fixed #27858 -- Prevented read-only management commands from creating the ↵Marti Raudsepp
django_migrations table. MigrationRecorder now assumes that if the django_migrations table doesn't exist, then no migrations are applied. Reverted documentation change from refs #23808.
2017-06-16Fixed #27787 -- Made call_command() validate the options it receives.Chandrakant Kumar
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-04-01Removed implicit default store_true/false argparse args.Jon Dufresne
argparse automatically sets the default value for store_true/false arguments to its opposite.
2017-02-21Refs #27656 -- Updated django.core docstring verbs according to PEP 257.Anton Samarchyan
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-20Refs #23919 -- Removed unneeded force_str callsClaude Paroz
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-10-02Fixed #27305 -- Removed BaseCommand.can_import_settings unused attributeClaude Paroz
Thanks Tim Graham for the review.
2016-09-30Removed unneeded no_settings_commands hardcoded listClaude Paroz
Thanks Tim Graham for the review.
2016-08-02Fixed #27000 -- Removed BaseCommand.usage() per deprecation timeline (refs ↵Tim Graham
#19973).
2016-04-08Refs #26351 -- Added check hook to support database-related checksClaude Paroz
Thanks Tim Graham and Shai Berger for the reviews.