Loading django/views/generic/detail.py +1 −2 Original line number Diff line number Diff line from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import Http404 from django.utils.encoding import smart_str from django.utils.translation import ugettext as _ from django.views.generic.base import TemplateResponseMixin, ContextMixin, View Loading Loading @@ -81,7 +80,7 @@ class SingleObjectMixin(ContextMixin): if self.context_object_name: return self.context_object_name elif hasattr(obj, '_meta'): return smart_str(obj._meta.object_name.lower()) return obj._meta.object_name.lower() else: return None Loading django/views/generic/list.py +1 −2 Original line number Diff line number Diff line from django.core.paginator import Paginator, InvalidPage from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.utils.encoding import smart_str from django.utils.translation import ugettext as _ from django.views.generic.base import TemplateResponseMixin, ContextMixin, View Loading Loading @@ -77,7 +76,7 @@ class MultipleObjectMixin(ContextMixin): if self.context_object_name: return self.context_object_name elif hasattr(object_list, 'model'): return smart_str('%s_list' % object_list.model._meta.object_name.lower()) return '%s_list' % object_list.model._meta.object_name.lower() else: return None Loading Loading
django/views/generic/detail.py +1 −2 Original line number Diff line number Diff line from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import Http404 from django.utils.encoding import smart_str from django.utils.translation import ugettext as _ from django.views.generic.base import TemplateResponseMixin, ContextMixin, View Loading Loading @@ -81,7 +80,7 @@ class SingleObjectMixin(ContextMixin): if self.context_object_name: return self.context_object_name elif hasattr(obj, '_meta'): return smart_str(obj._meta.object_name.lower()) return obj._meta.object_name.lower() else: return None Loading
django/views/generic/list.py +1 −2 Original line number Diff line number Diff line from django.core.paginator import Paginator, InvalidPage from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.utils.encoding import smart_str from django.utils.translation import ugettext as _ from django.views.generic.base import TemplateResponseMixin, ContextMixin, View Loading Loading @@ -77,7 +76,7 @@ class MultipleObjectMixin(ContextMixin): if self.context_object_name: return self.context_object_name elif hasattr(object_list, 'model'): return smart_str('%s_list' % object_list.model._meta.object_name.lower()) return '%s_list' % object_list.model._meta.object_name.lower() else: return None Loading