Saturday, July 27, 2013

Advanced Tutorial (how to write reusable app), last step does not work

Django is using a coding "style" called covention over configuration. That means that you don't have to configure every bit of your application instead a convention is used to determine where you have to place stuff so django finds and uses it. For the beginner it seems like django is using some sort of magic to connect erlverything together.
In your case, having read the tutorial a long time ago, you surely created a View class that is derived from the ListView base class. The convention here is that you create a template called <modelnqme>_list.html. If you have a file with this name, the listview will use it for rendering. It seems the creation of this file is missing in the tutorial. But it is pretty straight forward if you look at the documentation of the listview base class.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment