> When I said you're right, I meant your insight into my spelling
> error.
That is the one thing that's hard in every web framework: find the spots
where something can be wrong when everything *seems* right.
Four common spots in django:
- Typo in urls.py (like you had).
- A circular import. Your models.py imports from views.py and views.py
imports from models.py. You get an error like "cannot import
yourproject.views", even though ``yourproject/views.py`` is right there
before your eyes :-)
- A url higher up in the urlpatterns that matches *before* the url you
*think* is matching. The url should match perfectly, but you get a
strange error because the wrong view is being called.
- You're depending on some application in your setup.py's
"install_requires" list. The application is installed. Why doesn't it
show up? You probably forgot to add it to your INSTALLED_APPS list in
your settings.py. At least, that happened to me a few times. "I can
import it, why doesn't it work?!?"
Reinout
--
Reinout van Rees http://reinout.vanrees.org/
reinout@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment