Version 4 (modified by rmunn@…, 10 years ago) (diff)

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


Please 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.

URLconf include() misbehaving


You'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'.

Probable cause

You may have tried to load your view files using include() in the URLconf file (in tutorial 3, this is myproject/settings/urls/ The include() call assumes that the file it's loading is also a URLconf file.


Remove 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