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
Claude Paroz
42a67ec1cd
Fixed #21269 -- Don't crash when CommandError contains non-ascii
...
Thanks kontakt@eikefoken.de for the report.
2013-10-14 21:21:07 +02:00
Gregor MacGregor
b2b763448f
Fixed #20841 -- Added messages to NotImplementedErrors
...
Thanks joseph at vertstudios.com for the suggestion.
2013-09-10 11:09:59 -04:00
Jose L. Patino
7b57e575c9
Fixed #19877 -- Added `--no-color` option to `BaseCommand` to avoid using output styles.
2013-07-30 09:26:18 -04:00
Jorge Bastida
888c86dcf3
Fixed #20445 -- Raised original exception after command error
2013-05-20 18:59:37 +02:00
Aymeric Augustin
9c487b5974
Replaced an antiquated pattern.
...
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Claude Paroz
6a91b63842
Fixed #19923 -- Display tracebacks for non-CommandError exceptions
...
By default, show tracebacks for management command errors when the
exception is not a CommandError.
Thanks Jacob Radford for the report.
2013-03-09 12:38:45 +01:00
Ramiro Morales
21ea58b8cc
Enhanced docs and docctrings added in 869c9ba
.
...
Thanks Claude for the suggestion.
2013-02-04 08:55:45 -03:00
Ramiro Morales
869c9ba306
Fixed #19730 -- Don't validate importability of settings by using i18n in management commands.
...
They are handled independently now and the latter can be influenced by
the new BaseCommand.leave_locale_alone internal option.
Thanks chrischambers for the report, Claude, lpiatek, neaf and gabooo for
their work on a patch, originally on refs. #17379 .
2013-02-03 23:40:38 -03:00
Claude Paroz
b9c8bbf372
Fixed #19665 -- Ensured proper stderr output for Command.run_from_argv
...
Thanks Stefan Koegl for the report and Simon Charette for the review.
2013-01-25 14:56:41 +01:00
Claude Paroz
ae88e73fa6
Replaced some smart_xxx by force_xxx equivalent
...
smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
2012-08-30 15:46:16 +02:00
Aymeric Augustin
a8b3ddec5f
[py3] Applied minor fixes so the test suite starts
2012-08-07 12:00:22 +02:00
Claude Paroz
f2b6763ad7
Fixed #18387 -- Do not call sys.exit during call_command.
...
Moved sys.exit(1) so as failing management commands reach it
only when running from command line.
2012-05-27 20:38:47 +02:00
Claude Paroz
3b5083bee5
Fixed #5423 -- Made dumpdata output one row at a time.
...
This should prevent storing all rows in memory when big sets of
data are dumped.
See ticket for heroic contributors.
2012-05-26 11:43:37 +02:00
Claude Paroz
822d6d6dab
Fixed #18325 -- Wrapped self.stdout/stderr in OutputWrapper class
2012-05-19 13:51:54 +02:00
Claude Paroz
d7dfab59ea
Replaced cStringIO.StringIO by io.BytesIO.
...
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Anssi Kääriäinen
4fdd378beb
Skip model validation when models are known good.
...
In some situations Django calls model validation when the models are
already known good. This is most visible in tests, which use flush
and loaddata commands. This resulted in around 10% overhead when
running tests under sqlite.
2012-05-01 08:40:04 +03:00
Claude Paroz
3904b74a3f
Fixed #18013 -- Use the new 'as' syntax for exceptions.
...
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Claude Paroz
9383a2761c
Removed with_statement imports, useless in Python >= 2.6. Refs #17965 . Thanks jonash for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Claude Paroz
8c54d7cf71
Fixed #17947 -- Fixed language restore after management command even when exceptions occur. Thanks andrey@kostenko.name for the report and the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-29 16:33:48 +00:00
Jannis Leidel
a9a0f0b03f
Fixed #17042 -- Extended startproject and startapp management commands to better handle custom app and project templates. Many thanks to Preston Holmes for his initial patch and Alex Gaynor, Carl Meyer, Donald Stufft, Jacob Kaplan-Moss and Julien Phalip for code reviewing.
...
* Added ability to pass the project or app directory path as the second argument
* Added ``--template`` option for specifying custom project and app templates
* Cleaned up admin_scripts tests a little while I was there
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 22:38:02 +00:00