mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
More attacking E302 violators
This commit is contained in:
@@ -9,6 +9,7 @@ from django.utils.functional import Promise
|
||||
from django.utils import six
|
||||
from django.utils.six.moves.urllib.parse import quote
|
||||
|
||||
|
||||
class DjangoUnicodeDecodeError(UnicodeDecodeError):
|
||||
def __init__(self, obj, *args):
|
||||
self.obj = obj
|
||||
@@ -19,6 +20,7 @@ class DjangoUnicodeDecodeError(UnicodeDecodeError):
|
||||
return '%s. You passed in %r (%s)' % (original, self.obj,
|
||||
type(self.obj))
|
||||
|
||||
|
||||
def python_2_unicode_compatible(klass):
|
||||
"""
|
||||
A decorator that defines __unicode__ and __str__ methods under Python 2.
|
||||
|
||||
Reference in New Issue
Block a user