﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1812	[patch] django-admin sql <foo> gives exception when no model exists	ian@…	Malcolm Tredinnick	"hi.
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.
"	defect	closed	Core (Management commands)		normal	fixed			Unreviewed	1	0	0	0	0	0
