[1.6.x] Fixed #21801 -- Documented SingleObjectMixin.get_context_data() requires the object attribute.

Backport of 03c1609c47 from master
This commit is contained in:
Tim Graham 2014-08-19 12:06:07 -04:00
parent 18f25efc9e
commit c0e49ef767
1 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,10 @@ SingleObjectMixin
Returns context data for displaying the list of objects. Returns context data for displaying the list of objects.
The base implementation of this method requires that the ``object``
attribute be set by the view (even if ``None``). Be sure to do this if
you are using this mixin without one of the built-in views that does so.
.. method:: get_slug_field() .. method:: get_slug_field()
Returns the name of a slug field to be used to look up by slug. By Returns the name of a slug field to be used to look up by slug. By