Changes between Version 3 and Version 4 of NewbieMistakes


Ignore:
Timestamp:
Aug 17, 2005, 9:15:33 AM (19 years ago)
Author:
rmunn@…
Comment:

Reformatted to a Symptom -> Probable cause -> Solution structure

Legend:

Unmodified
Added
Removed
Modified
  • NewbieMistakes

    v3 v4  
    33Please feel free to share the things that tripped you up when you started with Django. We'll try to improve Django's error handling to catch such mistakes in the future.
    44
    5  * Referencing your view files using include() in your URLconf file (in tutorial 3, this is myproject/settings/urls/main.py) will cause the framework to try and load your views as URLconf files. This will give you cryptic errors about how there is no module 'index' (where 'index' is some function you are trying to assign as a view), or module 'foo' has no attribute 'urlpatterns'.
     5== URLconf include() misbehaving ==
     6
     7==== Symptom ====
     8
     9You're trying to get your URLconf files to work, but getting cryptic errors about how there is no module 'index' (where 'index' is some function you are trying to assign as a view), or module 'foo' has no attribute 'urlpatterns'.
     10
     11==== Probable cause ====
     12
     13You may have tried to load your view files using include() in the URLconf file (in tutorial 3, this is myproject/settings/urls/main.py). The include() call assumes that the file it's loading is also a URLconf file.
     14
     15==== Solution ====
     16
     17Remove the include(). Just give the module and function name (e.g., {{{'myproject.apps.polls.views.polls.index'}}}) as a string, with no include() around it.
Back to Top