diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-11 22:18:09 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-12 14:44:40 +0200 |
| commit | 2bb2eecb6358ea4243ab7a6286048b86302f5128 (patch) | |
| tree | 76d3862d93016e0049496dd3171eb774406d53f0 /django | |
| parent | dbb63e56eaa6e2e2a574d4327464332b3ef9f970 (diff) | |
[py3] Removed redundant __str__ methods.
These classes already have an identical __unicode__ method, which
will be used after an upcoming refactoring.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/auth/models.py | 3 | ||||
| -rw-r--r-- | django/contrib/databrowse/datastructures.py | 3 | ||||
| -rw-r--r-- | django/core/files/base.py | 3 | ||||
| -rw-r--r-- | django/template/base.py | 3 |
4 files changed, 0 insertions, 12 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 1099aa195b..a39165c92c 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -419,9 +419,6 @@ class AnonymousUser(object): def __unicode__(self): return 'AnonymousUser' - def __str__(self): - return six.text_type(self).encode('utf-8') - def __eq__(self, other): return isinstance(other, self.__class__) diff --git a/django/contrib/databrowse/datastructures.py b/django/contrib/databrowse/datastructures.py index 810e039894..e48383f438 100644 --- a/django/contrib/databrowse/datastructures.py +++ b/django/contrib/databrowse/datastructures.py @@ -97,9 +97,6 @@ class EasyInstance(object): return val[:DISPLAY_SIZE] + '...' return val - def __str__(self): - return self.__unicode__().encode('utf-8') - def pk(self): return self.instance._get_pk_val() diff --git a/django/core/files/base.py b/django/core/files/base.py index d0b25250a5..87fa8bc8ec 100644 --- a/django/core/files/base.py +++ b/django/core/files/base.py @@ -17,9 +17,6 @@ class File(FileProxyMixin): if hasattr(file, 'mode'): self.mode = file.mode - def __str__(self): - return smart_bytes(self.name or '') - def __unicode__(self): return smart_text(self.name or '') diff --git a/django/template/base.py b/django/template/base.py index 661d8c092a..4dcba6dd2b 100644 --- a/django/template/base.py +++ b/django/template/base.py @@ -85,9 +85,6 @@ class VariableDoesNotExist(Exception): self.msg = msg self.params = params - def __str__(self): - return six.text_type(self).encode('utf-8') - def __unicode__(self): return self.msg % tuple([force_text(p, errors='replace') for p in self.params]) |
