Changes between Version 25 and Version 26 of NewbieMistakes


Ignore:
Timestamp:
Jul 20, 2006, 8:19:53 PM (18 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewbieMistakes

    v25 v26  
    247247}}}
    248248
    249 == Reserved name on an application causes import error ==
    250 
    251 ==== Symptom ====
    252 
    253 After creating a new app, with a model that validates, the page request errors out due to existing (and theoretically) available module that can't be loaded.
     249== Using reserved name on application breaks admin ==
     250
     251==== Symptom ====
     252
     253After creating a new app, with a model that validates, trying to log on to the admin causes an error similar to:
     254
     255{{{
     256ImproperlyConfigured: Error importing middleware django.middleware.common: "No module named ... "
     257}}}
    254258
    255259==== Possible cause ====
    256260
    257 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 cause an error when requested
    258 
    259 ==== Solution ====
    260 
    261 Rename your application using a non-reserved name, i.e., "email_app" instead of "email". 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.
     261Check 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
     262
     263==== Solution ====
     264
     265Rename 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.
Back to Top