Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed unneeded smart_str in generic views.

  • Loading branch information...
commit 2042f537a6d7d67bdf65ca322aad1c6124e07527 1 parent 8c72aa2
Claude Paroz authored May 24, 2012
3  django/views/generic/detail.py
... ...
@@ -1,6 +1,5 @@
1 1
 from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
2 2
 from django.http import Http404
3  
-from django.utils.encoding import smart_str
4 3
 from django.utils.translation import ugettext as _
5 4
 from django.views.generic.base import TemplateResponseMixin, ContextMixin, View
6 5
 
@@ -81,7 +80,7 @@ def get_context_object_name(self, obj):
81 80
         if self.context_object_name:
82 81
             return self.context_object_name
83 82
         elif hasattr(obj, '_meta'):
84  
-            return smart_str(obj._meta.object_name.lower())
  83
+            return obj._meta.object_name.lower()
85 84
         else:
86 85
             return None
87 86
 
3  django/views/generic/list.py
... ...
@@ -1,7 +1,6 @@
1 1
 from django.core.paginator import Paginator, InvalidPage
2 2
 from django.core.exceptions import ImproperlyConfigured
3 3
 from django.http import Http404
4  
-from django.utils.encoding import smart_str
5 4
 from django.utils.translation import ugettext as _
6 5
 from django.views.generic.base import TemplateResponseMixin, ContextMixin, View
7 6
 
@@ -77,7 +76,7 @@ def get_context_object_name(self, object_list):
77 76
         if self.context_object_name:
78 77
             return self.context_object_name
79 78
         elif hasattr(object_list, 'model'):
80  
-            return smart_str('%s_list' % object_list.model._meta.object_name.lower())
  79
+            return '%s_list' % object_list.model._meta.object_name.lower()
81 80
         else:
82 81
             return None
83 82
 

0 notes on commit 2042f53

Please sign in to comment.
Something went wrong with that request. Please try again.