1
0
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:
Alex Gaynor
2013-11-02 13:12:09 -07:00
parent 65c4ac3b24
commit 7548aa8ffd
150 changed files with 433 additions and 1 deletions

View File

@@ -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.