http://docs.djangoproject.com/en/dev/topics/generic-views/#adding-extra-context
I am confused by the model scenario.

"For example, think of showing a list of all the books on each
publisher detail page. The object_detail generic view provides the
publisher to the context, but it seems there's no way to get
additional information in that template."
So, say below the detail of a publisher (first name, last name, books
published, phone, address, logo...etc), we might want to display a
list of other publisher.

"This would populate a {{ book_list }} variable in the template
context. This pattern can be used to pass any information down into
the template for the generic view. It's very handy."

So why do we create extra_context anyway?

A section above, the urlpatterns was
"urlpatterns = patterns('',
    (r'^publishers/$', list_detail.object_list, publisher_info)
)"

I am confused. Can anyone explain what's going on if I have the
extra_context, and how do I exactly used that? Thanks.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to