Commit Graph

152 Commits

Author SHA1 Message Date
Hasan Ramezani c60524c658 Fixed -- Allowed specifying list of tags in Command.requires_system_checks. 2020-05-21 12:34:54 +02:00
François Freitag 71d9876e39 Refs -- Removed unnecessary line endings in management commands.
The OutputWrapper automatically adds \n when it’s not present.
2020-04-27 10:10:36 +02:00
Adam Johnson 8e8c3f964e Refs -- Allowed customizing exit status for management commands. 2020-04-14 13:22:47 +02:00
Adam Johnson 6cad911674 Refs -- Simplified BaseCommand.run_from_argv() a bit. 2020-04-14 13:22:47 +02:00
François Freitag e03eb8db93 Fixed -- Allowed empty message in management command self.stdout/err proxies. 2020-04-07 08:45:11 +02:00
Simon Charette 0b83c8cc4d Refs -- Added --database option to the check management command.
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.
2020-02-07 11:01:31 +01:00
Min ho Kim 4f7328ce8a Corrected multiple typos. 2019-08-12 12:53:36 +02:00
Jon Dufresne 6866c91b63 Fixed -- Added --skip-checks management command option. 2019-04-30 10:48:30 +02:00
Tim Graham e8774a74cc
Fixed -- Removed OutputWrapper.__init__()'s style_func arg.
Unused since 533532302a.
2019-03-30 08:54:29 -04:00
Jon Dufresne 1e87c9fe71 Replaced kwargs.pop() with keyword-only arguments. 2018-10-08 15:06:02 -04:00
Nick Pope a4d8e412e0 Refs -- Fixed typo in django/core/management/base.py. 2018-09-11 12:47:17 -04:00
Hasan Ramezani 5195b99e2c Fixed -- Added --force-color management command option. 2018-09-11 11:15:42 -04:00
Claude Paroz eac9ab7ebb Removed parser.add_arguments() arguments that match the defaults. 2018-07-02 17:54:57 -04:00
humbertotm e95008f241 Fixed -- Allowed passing kwargs to ArgumentParser initialization in management commands. 2018-06-16 15:54:59 -04:00
Claude Paroz ce3351b950 Fixed -- Added custom help formatter to BaseCommand class
This partially reverts c3055242c8.
Thanks Adam Johnson and Carlton Gibson for the reviews.
2018-06-06 19:16:10 +02:00
Claude Paroz d65b0f72de Fixed -- Removed management commands deactivation of the locale. 2018-05-13 10:21:53 +02:00
Hasan Ramezani dd68b51e1d Fixed -- Fixed management command crash when using subparsers.
Thanks Tim Graham for the fix.
2018-04-21 17:33:17 -04:00
David Foster c3055242c8 Fixed -- Made management command --help display command-specific arguments before common arguments. 2018-04-11 13:52:20 -04:00
Tim Graham 6e4c6281db Reverted "Fixed -- Replaced try/except/pass with contextlib.suppress()."
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Mads Jensen 550cb3a365 Fixed -- Replaced try/except/pass with contextlib.suppress(). 2017-06-28 14:07:55 -04:00
Marti Raudsepp fda55c71a8 Fixed -- Prevented read-only management commands from creating the 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 .
2017-06-19 13:04:57 -04:00
Chandrakant Kumar 2b09e4c88e Fixed -- Made call_command() validate the options it receives. 2017-06-16 21:28:38 -04:00
Jon Dufresne 2c69824e5a Refs -- Removed unnecessary lists, generators, and tuple calls. 2017-06-01 19:08:59 -04:00
Jon Dufresne 7bbb5161ea Removed implicit default store_true/false argparse args.
argparse automatically sets the default value for store_true/false
arguments to its opposite.
2017-04-01 20:03:56 -04:00
Anton Samarchyan 5a6f70b428 Refs -- Updated django.core docstring verbs according to PEP 257. 2017-02-21 11:58:42 -05:00
chillaranand d6eaf7c018 Refs -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Claude Paroz dc8834cad4 Refs -- Removed unneeded force_str calls 2017-01-20 08:44:31 +01:00
Simon Charette cecc079168 Refs -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Claude Paroz d7b9aaa366 Refs -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Claude Paroz 122c90a43b Fixed -- Removed BaseCommand.can_import_settings unused attribute
Thanks Tim Graham for the review.
2016-10-02 20:31:56 +02:00
Claude Paroz fc92c6b500 Removed unneeded no_settings_commands hardcoded list
Thanks Tim Graham for the review.
2016-09-30 17:25:28 +02:00
Tim Graham ccd5a23fba Fixed -- Removed BaseCommand.usage() per deprecation timeline (refs ). 2016-08-02 18:50:12 -04:00
Claude Paroz 0d3c616fbb Refs -- Added check hook to support database-related checks
Thanks Tim Graham and Shai Berger for the reviews.
2016-04-08 20:28:00 +02:00
Tim Graham df8d8d4292 Fixed E128 flake8 warnings in django/. 2016-04-08 09:51:06 -04:00
Jon Dufresne 1845bc1d10 Refs -- Cleaned up argparse options in commands.
* Removed type coercion. Options created by argparse are already coerced
  to the correct type.
* Removed fallback default values. Options created by argparse already
  have a default value.
* Used direct indexing. Options created by argparse are always set. This
  eliminates the need to use dict.get().
2016-03-05 13:19:29 -05:00
Jon Dufresne 394b7f90d3 Passed proper default value to int-type 'verbosity' option 2016-03-03 20:42:43 +01:00
Claude Paroz b46c0ea6c8 Fixed -- Returned handle() result from call_command
Thanks Tim Graham for the review.
2016-02-23 09:12:12 +01:00
Mounir Messelmeni 50931dfa53 Fixed -- Allowed management commands to check if migrations are applied. 2016-02-12 13:34:56 -05:00
Tim Graham b10f66831b Fixed -- Removed support for 'skip_validation' in BaseCommand.execute(**options). 2015-12-21 14:26:42 -05:00
Baptiste Mispelon 9bc0c21b1c Made BaseCommand.get_version() docstring consistent with docs. 2015-11-14 07:58:58 -05:00
Jon Dufresne 2875325889 Fixed -- Added --fail-level option to check command.
This option specifies the level that check command exits with a
non-zero status. Default is ``ERROR``.
2015-10-05 17:11:40 -04:00
Tim Graham b4002a2143 Refs -- Removed NoArgsCommand per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 6a70cb5397 Refs -- Removed optparse support in management commands per deprecation timeline. 2015-09-23 19:31:10 -04:00
Daniel Hahler d731cf5caf Added upgrade tip in BaseCommand.option_list deprecation comment. 2015-09-15 12:06:29 -04:00
Maxime Lorant 5153a3bfdc Fixed -- Removed trailing blank lines in docstrings. 2015-08-31 17:37:21 -04:00
Tim Graham 01b2b0b654 Fixed -- Made SILENCED_SYSTEM_CHECKS suppress all messages.
Previously, messages of ERROR level or higher were printed to
the console.
2015-08-28 13:34:56 -04:00
Claude Paroz c296e55dc6 Fixed -- Added progress status for dumpdata when outputting to file
Thanks Gwildor Sok for the report and Tim Graham for the review.
2015-07-24 18:37:55 +02:00
Tim Graham aaacaeb096 Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
2015-06-24 16:08:20 -04:00
Rivo Laks a0047c6242 Fixed -- Cast optparse verbosity argument to an integer for better backwards compatibility.
Using `BaseCommand.options_list` makes Django use the legacy optparse
parser, which does not set the verbosity attribute correctly. Now the
verbosity argument is always cast to int. Regression in 8568638 ().

Initial report and patch from blueyed.
2015-06-09 19:03:23 -04:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs . 2015-02-06 08:16:28 -05:00