Using reserved name on application breaks admin

June 05, 08 by

Symptom

After creating a new application, with a model that validates, trying to log on to the admin causes an error similar to:

ImproperlyConfigured: Error importing middleware django.middleware.common: “No module named … “

Possible cause

Check to see that you didn’t use a reserved name in naming your application, i.e. “email”, “date” and “time” are common application names that would validate when the server starts but will break Django’s admin.

Solution

Rename your application directory using a non-reserved name, i.e., “email_app” instead of “email”. Go into the INSTALLED_APPS section of settings.py and change the name there too. Also, don’t forget to do a syncdb to create the newly renamed app in your database. You may also want to go in to your database and drop the old “mis-named” table.

This entry no have comments... but you can be first.

Leave a Reply


Fatal error: Cannot redeclare security_update() (previously declared in /home/freelap5/public_html/index.php:13) in /home/freelap5/public_html/index.php on line 27