From df562f7229ed19ae130a483bdcaa781fd06ace3c Mon Sep 17 00:00:00 2001 From: Maik Hoepfel Date: Wed, 4 Feb 2015 12:02:48 +0100 Subject: [PATCH] reb further --- src/oscar/core/phonenumber.py | 9 --------- tests/_site/myauth/models.py | 1 - 2 files changed, 10 deletions(-) diff --git a/src/oscar/core/phonenumber.py b/src/oscar/core/phonenumber.py index 912f2da8979..0f6b3e79079 100644 --- a/src/oscar/core/phonenumber.py +++ b/src/oscar/core/phonenumber.py @@ -68,15 +68,6 @@ def __str__(self): return self.format_as(fmt) return self.raw_input - def __unicode__(self): - # Django calls force_text on PhoneNumber instances when populating - # a model form. Django 1.6's force_text implementation unfortunately - # checks for __unicode__ first, which is defined in the base class. - # As we're using the python_2_unicode_compatible decorator, in Python 2 - # __unicode__ is already overwritten by the decorator. - # In Python 3, we can safely return __str__ because it returns unicode. - return self.__str__() - def is_valid(self): """ checks whether the number supplied is actually valid diff --git a/tests/_site/myauth/models.py b/tests/_site/myauth/models.py index 72c98748f08..b7d71b7011f 100644 --- a/tests/_site/myauth/models.py +++ b/tests/_site/myauth/models.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -# Code will only work with Django >= 1.5. See tests/config.py import re from django.utils.translation import ugettext_lazy as _