mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #15272 -- Altered generic views to use the guaranteed untranslated object_name, rather than the possibly translated verbose_name(_plural) for default context objects. Thanks to szczav for the report and patch.
This is BACKWARDS INCOMPATIBLE for anyone relying on the default context object names for class-based Detail and List views. To migrate, either update your templates to use the new default names, or add a context_object_name argument to your generic views. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -72,7 +72,8 @@ The ``_list`` suffix on list views
|
||||
In a function-based :class:`ListView`, the ``template_object_name``
|
||||
was appended with the suffix ``'_list'`` to yield the final context
|
||||
variable name. In a class-based ``ListView``, the
|
||||
``context_object_name`` is used verbatim.
|
||||
``context_object_name`` is used verbatim. The ``'_list'`` suffix
|
||||
is only applied when generating a default context object name.
|
||||
|
||||
The context data for ``object_list`` views
|
||||
------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user