#21737 closed Cleanup/optimization (fixed)
ImproperlyConfigured hidden, which causes hard to debug errors
Reported by: | Florian Apolloner | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Release blocker | Keywords: | app-loading |
Cc: | Aymeric Augustin | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Putting an AppConfig
without a name
attribute into INSTALLED_APPS
raises this nice error:
Traceback (most recent call last): File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/home/florian/sources/django.git/django/core/management/__init__.py", line 426, in execute_from_command_line utility.execute() File "/home/florian/sources/django.git/django/core/management/__init__.py", line 418, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/florian/sources/django.git/django/core/management/__init__.py", line 280, in fetch_command commands = get_commands() File "/home/florian/.virtualenvs/conticki/lib/python3.4/functools.py", line 427, in wrapper result = user_function(*args, **kwds) File "/home/florian/sources/django.git/django/core/management/__init__.py", line 118, in get_commands app_configs = apps.get_app_configs() File "/home/florian/sources/django.git/django/apps/registry.py", line 121, in get_app_configs self.check_ready() File "/home/florian/sources/django.git/django/apps/registry.py", line 115, in check_ready raise RuntimeError("App registry isn't ready yet.") RuntimeError: App registry isn't ready yet.
This is due to the fact that d.c.management
ignores ImproperlyConfigured
from django.setup
Attachments (1)
Change History (6)
comment:1 by , 11 years ago
Keywords: | app-loading added |
---|---|
Severity: | Normal → Release blocker |
Triage Stage: | Unreviewed → Accepted |
by , 11 years ago
Attachment: | 21737-1.diff added |
---|
comment:2 by , 11 years ago
Has patch: | set |
---|---|
Needs tests: | set |
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 11 years ago
Oops - we worked on the same ticket at the same time.
But we came up with pretty much the same solution.
Note:
See TracTickets
for help on using tickets.
Possible fix