| Age | Commit message (Collapse) | Author |
|
Refs #23663.
|
|
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.
|
|
This commit reverts 67d7da5fb9498b811f0168f5df2308ad4743027f.
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.
|
|
Thanks papaloizouc for the report.
|
|
|
|
|
|
|
|
|
|
Refs #19973.
|
|
|
|
Thanks Tim Graham for the review.
|
|
Also added a compatibility check for changed middleware defaults.
Forwardport of d94de802d3 from stable/1.7.x
|
|
Thanks nikolay.v.golub@gmail.com for the report.
|
|
|
|
|
|
refs #21092 and 8d7e048a8b428bebe82be735a84570f9250441e6
|
|
Environment keys/values need to use native strings on some
plateforms. Thanks anubhav joshi for detecting the issue and
helping shaping the patch.
|
|
|
|
|
|
Thanks Piotr Kasprzyk for help with the patch.
|
|
And without causing a circular import. Thanks Akis Kesoglou for
the report.
|
|
|
|
Thanks Russell for the report, Marc for the initial patch, Carl for the
final review, and everyone who contributed to the design discussion.
|
|
These warnings all emerged as the result of the introduction of the checks framework.
Thanks to Anssi Kääriäinen for the report.
|
|
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.
|
|
This (nearly) completes the work to isolate all the test modules from
each other. This is now more important as importing models from another
module will case PendingDeprecationWarnings if those modules are not in
INSTALLED_APPS. The only remaining obvious dependencies are:
- d.c.auth depends on d.c.admin (because of the is_admin flag to some
views), but this is not so important and d.c.admin is in
always_installed_apps
- test_client_regress depends on test_client. Eventually these should
become a single module, as the split serves no useful purpose.
|
|
|
|
The last component of the dotted path to the application module is
consistently referenced as the application "label". For instance it's
AppConfig.label. appname could be confused with AppConfig.name, which is
the full dotted path.
|
|
|
|
Adjusted several tests that used it to add apps to the app cache and
then attempted to remove them by manipulating attributes directly.
Also renamed invalid_models to invalid_models_tests to avoid clashing
application labels between the outer and the inner invalid_models
applications.
|
|
It wasn't used anywhere and couldn't be implemented any more since
non-installed apps no longer have a configuration.
|
|
Refactored get_app() to rely on that method.
get_app() starts by calling _populate(), which goes through
INSTALLED_APPS and, for each app, imports the app module and attempts to
import the models module. At this point, no further imports are
necessary to return the models module for a given app. Therefore, the
implementation of get_app() can be simplified and the safeguards for
race conditions can be removed.
Besides, the emptyOK parameter isn't used anywhere in Django. It was
introduced in d6c95e93 but not actually used nor documented, and it has
just been carried around since then. Since it's an obscure private API,
it's acceptable to stop supporting it without a deprecation path. This
branch aims at providing first-class support for applications without a
models module eventually.
For backwards-compatibility, get_app() still raises ImproperlyConfigured
when an app isn't found, even though LookupError is technically more
correct. I haven't gone as far as to preserve the exact error messages.
I've adjusted a few tests instead.
|
|
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
|
|
|
Change strategy used to examine instrumented output to acommodate the
fact that on Windows, where the path separator is '\', repr() of Python
modules has changed in Python 3 to use escaped backslashes in the FS
path section (e.g.
'C:\\python3x\\Lib\\site-packages\\django\\contrib\\auth\\models.py')
without having to special-case based on platform.
|
|
When listing available management commands, only core commands are
listed if settings have any error. This commit adds a note in this
case so errors are not totally silently skipped.
Thanks Peter Davis for the report.
|
|
Thanks wildfire for the report.
|
|
Thanks kontakt@eikefoken.de for the report.
|
|
* Removed trailing whitespace.
* Added newline to EOF if missing.
* Removed blank lines at EOF.
* Removed some stray tabs.
|
|
Refs #18091.
|
|
|
|
|
|
|
|
output styles.
|
|
As some settings are copied from current user settings, we cannot
be sure the characters are pure ascii.
|
|
Refs #20680.
|
|
|
|
Fixed #20483.
|
|
Refs #19875.
|
|
Thanks weipin for the report and Baptiste Mispelon for the patch.
|