Commit Graph

109 Commits

Author SHA1 Message Date
Daniel Hahler d731cf5caf Added upgrade tip in BaseCommand.option_list deprecation comment. 2015-09-15 12:06:29 -04:00
Maxime Lorant 5153a3bfdc Fixed #25331 -- Removed trailing blank lines in docstrings. 2015-08-31 17:37:21 -04:00
Tim Graham 01b2b0b654 Fixed #25318 -- 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 #22258 -- 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 #24769 -- 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 (#19973).

Initial report and patch from blueyed.
2015-06-09 19:03:23 -04:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Tim Graham 0f169098ef Removed BaseCommand.validate() per deprecation timeline; refs #16905. 2015-01-18 14:49:51 -05:00
Tim Graham e278407b20 Removed unused imports from previous commit. 2015-01-17 13:22:52 -05:00
Tim Graham 4a03d348c7 Removed BaseCommand.requires_model_validation per deprecation timeline. 2015-01-17 12:59:07 -05:00
Tim Graham 00a11994a5 Removed support for AppCommand.handle_app() per deprecation timeline. 2015-01-17 12:34:34 -05:00
Claude Paroz dc90bf2ac8 Removed unused import 2015-01-14 09:31:24 +01:00
Claude Paroz f7c287fca9 Fixed #24073 -- Deactivated translations when leave_locale_alone is False
Thanks Tim Graham and Markus Holtermann for the reviews.
2015-01-07 20:11:24 +01:00
Claude Paroz 1d24f073e6 Fixed #21255 -- Closed connections after management command ran
Thanks kabakov.as@gmail.com for the report, and Aymeric Augustin,
Simon Charette for the reviews.
2014-12-29 19:02:45 +01:00
Jon Dufresne 4468c08d70 Fixed #23968 -- Replaced list comprehension with generators and dict comprehension 2014-12-08 07:58:23 -05:00
Matthew Somerville cc25bfebd5 Clarified BaseCommand --traceback behavior. 2014-10-30 14:15:31 -04:00
Loic Bistuer bdb4118b1a Fixed #23686 -- Tweak color output of the system check framework.
Thanks Tim Graham for the review.
2014-10-22 11:27:00 +07:00
Loic Bistuer 533532302a Fixed #23663 -- Initialize output streams for BaseCommand in __init__().
This helps with testability of management commands.

Thanks to trac username daveoncode for the report and to
Tim Graham and Claude Paroz for the reviews.
2014-10-22 09:25:50 +07:00
Loic Bistuer c34e13e17c Fixed #23107 -- Made runserver output respect --no-color.
This commit reverts 67d7da5fb9.

The previous fix changed the environment globally, which meant
that any call to `call_command(no_color=True)` prevented further
`call_command` with color.

This fix still relies on the environment because it's currently the only
way to reach WSGIRequestHandler, but it's now limited to the `runserver`
command. This seems an acceptable compromise considering `runserver` runs
indefinitely.

Thanks Tim Graham for the review.
2014-10-22 01:03:15 +07:00
Tim Graham 52ef6a4726 Fixed #17101 -- Integrated django-secure and added check --deploy option
Thanks Carl Meyer for django-secure and for reviewing.

Thanks also to Zach Borboa, Erik Romijn, Collin Anderson, and
Jorge Carleitao for reviews.
2014-09-12 15:05:23 -04:00
Tim Graham 1101467ce0 Limited lines to 119 characters in django/
refs #23395.
2014-09-05 09:22:16 -04:00
Raffaele Salmaso e0a98e2374 Fixed #23309 -- Fixed call_command to parse args correctly 2014-08-18 17:54:24 +02:00
Ramiro Morales 0bfb538661 Fixed #23291 -- Don't add Unicode varname/value to environment.
Windows doesn't like that and it causes 114 failures in the
admin_scripts tests with Python 2.x.
2014-08-14 12:22:21 -03:00
Christoph Heer d47409831f Fixed #23067 -- Updated docs to use django-admin 2014-07-30 14:14:03 -04:00
areski 67d7da5fb9 Fixed #23107 -- Made runserver output respect --no-color. 2014-07-30 12:58:53 -04:00
Maxime Turcotte 9996158db4 Fixed #22835 -- Deprecated NoArgsCommand. 2014-06-19 08:54:59 -04:00
Claude Paroz c24e979ece Fixed #7762 -- Hidden full script name in command error output 2014-06-14 20:01:02 +02:00
Claude Paroz 5949c2118d Restored command error behavior when called from command line
Refs #19973.
2014-06-14 18:53:33 +02:00
Claude Paroz 8568638603 Fixed #19973 -- Replaced optparse by argparse in management commands
Thanks Tim Graham for the review.
2014-06-14 11:17:48 +02:00
Alex Gaynor 1dcc603eff Fixed several typos in Django 2014-05-28 17:39:14 -07:00
Claude Paroz 210d0489c5 Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
2014-03-08 09:57:40 +01:00
Rodolfo Carvalho 0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Baptiste Mispelon 2a9ee49f3c Removed BaseCommand.stdin introduced in 116d39842d.
This option is not actually very useful in the general case
because it doesn't override sys.stdin.

It's still marginally useful for testing some features of
the createsuperuser command so it was moved there.
This commit also makes the detection of a TTY in createsuperuser
a bit more robust, after a suggestion of appolo13.
2014-02-18 11:36:06 +01:00
Baptiste Mispelon 116d39842d Added the possibility to pass a stdin object to a management command.
This makes testing certain features easier.

Thanks to AeroNotix for the original patch.
2014-02-17 04:58:31 +01:00
Tim Graham 2b6914049a Fixed #21849 -- Included the count of silenced system checks in output. 2014-01-28 08:31:02 -05:00
Wojciech Banaś 8f2f48ecc9 Fixed #21866 -- Replaced "COMMIT" in managmement command SQL with backend hook. 2014-01-26 12:42:41 -05:00
Aymeric Augustin ee4b806a85 Fixed #21873 -- Removed duplicate import.
Thanks Sephi for the report.
2014-01-25 23:22:03 +01:00
Russell Keith-Magee d818e0c9b2 Fixed #16905 -- Added extensible checks (nee validation) framework
This is the result of Christopher Medrela's 2013 Summer of Code project.

Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian
Apolloner, and Alex Gaynor for review notes along the way.

Also: Fixes #8579, fixes #3055, fixes #19844.
2014-01-20 10:45:21 +08:00
Aymeric Augustin bfcc686d22 Removed the only_with_models_module argument of get_model[s].
Now that the refactorings are complete, it isn't particularly useful any
more, nor very well named. Let's keep the API as simple as possible.

Fixed #21689.
2013-12-30 23:59:34 +01:00
Aymeric Augustin 0d2c8ff2be Populated the app registry earlier at startup.
Refs #1796, #21676.
2013-12-30 22:11:16 +01:00
Aymeric Augustin e5bcd1d455 Changed get_validation_errors to use an app config. 2013-12-29 21:48:58 +01:00
Aymeric Augustin bb8ec71f61 Updated the AppCommand API to support apps without a models module. 2013-12-28 09:42:59 +01:00
Aymeric Augustin 1716b7ce5a Renamed AppCache to Apps.
Also renamed app_cache to apps and "app cache" to "app registry".

Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24 12:25:17 +01:00
Aymeric Augustin 2fef9e5375 Moved apps back in the toplevel django namespace.
Reverted 4a56a93cc4.
2013-12-22 11:39:55 +01:00
Aymeric Augustin 4582993302 Populated models only when necessary in get_app_config[s].
Took this opportunity to change get_app[s] to only consider applications
containing a model module as that seems slightly more backwards compatible.

Since callers that care about models pass only_with_models_module=True,
this has very few consequences. Only AppCommand needed a change.
2013-12-22 11:39:18 +01:00
Aymeric Augustin 4a56a93cc4 Moved the new app cache inside core. 2013-12-17 10:17:46 +01:00
Aymeric Augustin 5ba743e262 Made it possible to create apps without a models module.
This commit reverts f44c4a5d0f and 39bbd165.

django.test.simple will be updated in a separate commit as it requires
invasive changes.
2013-12-17 10:17:45 +01:00
Aymeric Augustin 69039becde Deprecated get_app(). 2013-12-17 10:17:45 +01:00
Aymeric Augustin 8662654d6d Removed module-level functions for the app cache.
Since the original ones in django.db.models.loading were kept only for
backwards compatibility, there's no need to recreate them. However, many
internals of Django still relied on them.

They were also imported in django.db.models. They never appear in the
documentation, except a quick mention of get_models and get_app in the
1.2 release notes to document an edge case in GIS. I don't think that
makes them a public API.

This commit doesn't change the overall amount of global state but
clarifies that it's tied to the app_cache object instead of hiding it
behind half a dozen functions.
2013-12-17 10:17:44 +01:00
Tim Graham 36ded01527 Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00