diff options
| author | Claude Paroz <claude@2xlibre.net> | 2017-01-26 14:25:15 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-01-26 19:49:03 +0100 |
| commit | fee42fd99ee470528858c2ccb3621135c30ec262 (patch) | |
| tree | b7d0905a11f28a0b554d39b30e0286dca2a07cc1 /tests/contenttypes_tests | |
| parent | af598187ecd9ddf398aa7a68a2b955599ddf3ae1 (diff) | |
Refs #23919 -- Replaced usage of django.utils.http utilities with Python equivalents
Thanks Tim Graham for the review.
Diffstat (limited to 'tests/contenttypes_tests')
| -rw-r--r-- | tests/contenttypes_tests/models.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/contenttypes_tests/models.py b/tests/contenttypes_tests/models.py index 0aa8bbf0bc..5475c4aade 100644 --- a/tests/contenttypes_tests/models.py +++ b/tests/contenttypes_tests/models.py @@ -1,10 +1,11 @@ +from urllib.parse import quote + from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import SiteManager from django.db import models -from django.utils.http import urlquote class Site(models.Model): @@ -72,7 +73,7 @@ class FooWithUrl(FooWithoutUrl): """ def get_absolute_url(self): - return "/users/%s/" % urlquote(self.name) + return "/users/%s/" % quote(self.name) class FooWithBrokenAbsoluteUrl(FooWithoutUrl): @@ -126,4 +127,4 @@ class ModelWithNullFKToSite(models.Model): return self.title def get_absolute_url(self): - return '/title/%s/' % urlquote(self.title) + return '/title/%s/' % quote(self.title) |
