Opened 9 years ago

Closed 9 years ago

#11743 closed (duplicate)

Error in generic views documentation

Reported by: Fredde Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


There is an error in

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

Change History (1)

comment:1 Changed 9 years ago by Ramiro Morales

Resolution: duplicate
Status: newclosed

Duplicate of #11554

Note: See TracTickets for help on using tickets.
Back to Top