diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py
index b83f2f5..f534293 100644
a
|
b
|
class RegexURLResolver(LocaleRegexProvider):
|
246 | 246 | |
247 | 247 | def __repr__(self): |
248 | 248 | return smart_str('<%s %s (%s:%s) %s>' % ( |
249 | | self.__class__.__name__, self.urlconf_name, self.app_name, |
| 249 | self.__class__.__name__, force_text(self.urlconf_name), self.app_name, |
250 | 250 | self.namespace, self.regex.pattern)) |
251 | 251 | |
252 | 252 | def _populate(self): |
diff --git a/tests/regressiontests/admin_views/admin.py b/tests/regressiontests/admin_views/admin.py
index 293ddfe..379a8ed 100644
a
|
b
|
from .models import (Article, Chapter, Account, Media, Child, Parent, Picture,
|
27 | 27 | Album, Question, Answer, ComplexSortedPerson, PrePopulatedPostLargeSlug, |
28 | 28 | AdminOrderedField, AdminOrderedModelMethod, AdminOrderedAdminMethod, |
29 | 29 | AdminOrderedCallable, Report, Color2, UnorderedObject, MainPrepopulated, |
30 | | RelatedPrepopulated, UndeletableObject) |
| 30 | RelatedPrepopulated, UndeletableObject, UnicodeModel) |
31 | 31 | |
32 | 32 | |
33 | 33 | def callable_year(dt_value): |
… |
… |
site.register(Report, ReportAdmin)
|
622 | 622 | site.register(MainPrepopulated, MainPrepopulatedAdmin) |
623 | 623 | site.register(UnorderedObject, UnorderedObjectAdmin) |
624 | 624 | site.register(UndeletableObject, UndeletableObjectAdmin) |
| 625 | site.register(UnicodeModel) |
625 | 626 | |
626 | 627 | # We intentionally register Promo and ChapterXtra1 but not Chapter nor ChapterXtra2. |
627 | 628 | # That way we cover all four cases: |
diff --git a/tests/regressiontests/admin_views/models.py b/tests/regressiontests/admin_views/models.py
index 0d5e327..8775822 100644
a
|
b
|
class UndeletableObject(models.Model):
|
649 | 649 | Refs #10057. |
650 | 650 | """ |
651 | 651 | name = models.CharField(max_length=255) |
| 652 | |
| 653 | |
| 654 | @python_2_unicode_compatible |
| 655 | class UnicodeModel(models.Model): |
| 656 | name = models.CharField(max_length=50, verbose_name='¿Name?') |
| 657 | class Meta: |
| 658 | verbose_name = '¿Chapter?' |
| 659 | app_label = 'Продавница' |
| 660 | |
| 661 | def __str__(self): |
| 662 | return self.name |
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py
index 679e3a0..08a1235 100644
a
|
b
|
class AdminViewUnicodeTest(TestCase):
|
1637 | 1637 | response = self.client.post('/test_admin/admin/admin_views/book/1/delete/', delete_dict) |
1638 | 1638 | self.assertRedirects(response, '/test_admin/admin/admin_views/book/') |
1639 | 1639 | |
| 1640 | @override_settings(DEBUG=True) |
| 1641 | def test_unicode_app_label(self): |
| 1642 | """ |
| 1643 | Test the technical_404_response debug view can be generated with |
| 1644 | unicode content (#17566) |
| 1645 | """ |
| 1646 | response = self.client.get('/test_admin/admin/book/notexist/') |
| 1647 | self.assertEqual(response.status_code, 404) |
| 1648 | |
1640 | 1649 | |
1641 | 1650 | @override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',)) |
1642 | 1651 | class AdminViewListEditable(TestCase): |