django-admin.py check for database config includind during help subcommand
|Reported by:||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||1.3|
|Severity:||Normal||Keywords:||management django-admin.py manage.py|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If database settings define a dabatase engine not supported by the Python installation, it fails trying to show the "help" of any database related subcommand (i.e. sql*, syncdb, dumpdata, etc.).
In my case, i have 'postgresql_psycopg2' as 'ENGINE' value of the default database in settings.py (my production settings) and my python installation doesn't support postgresql. So, when i write:
$ python manage.py help dumpdata
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named psycopg2
It should simply show the help text. This problems also happen with the tab autocomplete, if the system autocomplete knows how to autocomplete the django-admin.py subcommands, as is in my case in an Ubuntu 11.04 installation and Django installed via apt-get.