[patch] django-admin sql <foo> gives exception when no model exists
|Reported by:||ian@…||Owned by:||mtredinnick|
|Component:||Core (Management commands)||Version:|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have a application which has no models in it.
when I run
django-admin.py sql text
it gives me the following exception.
Traceback (most recent call last): File "/usr/local/bin/django-admin.py", line 5, in ? management.execute_from_command_line() File "/magik/django/core/management.py", line 1195, in execute_from_command_line mod_list = [models.get_app(app_label) for app_label in args[1:]] File "/magik/django/db/models/loading.py", line 29, in get_app return __import__(app_name, '', '', ['models']).models AttributeError: 'module' object has no attribute 'models'
it should fail nicely.
Change History (10)
Changed 10 years ago by mattmcc
comment:1 Changed 10 years ago by mattmcc
- Summary changed from django-admin sql <foo> gives exception when no model exists to [patch] django-admin sql <foo> gives exception when no model exists
comment:3 Changed 10 years ago by russellm
- Resolution set to fixed
- Status changed from new to closed
comment:4 Changed 10 years ago by Alex Dedul
- Resolution fixed deleted
- Status changed from closed to reopened
comment:6 Changed 10 years ago by mtredinnick
- Owner changed from adrian to mtredinnick
- Status changed from reopened to new