Opened 11 years ago
Closed 11 years ago
#22807 closed Bug (wontfix)
Strange manage.py check warning when using cached template loader
Reported by: | jdimov | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.7-beta-2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
With Django 1.7, when I have TEMPLATE_LOADERS defined in the settings.py file to use caching, the ./manage.py check command complains with the following seemingly unrelated warning:
$ ./manage.py check System check identified some issues: WARNINGS: ?: (1_6.W001) Some project unittests may not execute as expected. HINT: Django 1.6 introduced a new default test runner. It looks like this project was generated using Django 1.5 or earlier. You should ensure your tests are all running & behaving as expected. See https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner for more information.
When I remove the setting, I get the expected "System check identified no issues (0 silenced)."
The setting in question is this:
TEMPLATE_LOADERS = ( ('django.template.loaders.cached.Loader', ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', )), )
Note:
See TracTickets
for help on using tickets.
Hi,
This particular check tries to detect a certain configuration using some heuristics and unfortunately, it can result in some false-positives.
You'll find more details in the comments of the corresponding function: https://github.com/django/django/blob/master/django/core/checks/compatibility/django_1_6_0.py#L17-L88
I'm going to close this as
wontfix
but if you have some ideas on how to improve the heuristics, please feel free to reopen the ticket.Thanks.