Error in generic views documentation
|Reported by:||Fredde||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
There is an error in http://docs.djangoproject.com/en/dev/topics/generic-views/#adding-extra-context:
"The problem has to do with when the queries in extra_context are evaluated. Because this example puts Publisher.objects.all() in the URLconf, it will be evaluated only once (when the URLconf is first loaded). Once you add or remove publishers, you'll notice that the generic view doesn't reflect those changes until you reload the Web server (see Caching and QuerySets for more information about when QuerySets are cached and evaluated)."
It's the Book.objects.all() that's only evaluated once.