From ed33b00dccd9af4072ac5bf75c8062f676c8ecf1 Mon Sep 17 00:00:00 2001 From: Erik Stein Date: Fri, 31 Aug 2018 10:38:42 +0200 Subject: [PATCH] Use DowngradingSlugField --- CHANGES | 2 +- setup.py | 2 +- shared/people/models.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 18e4888..37de552 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,5 @@ 0.4.1 -- New AutoSlugField from shared.utils (>= 0.2.5). +- DowngradingSlugField from shared.utils>= 0.2.5. 0.4 2018-07-10 - Fix. diff --git a/setup.py b/setup.py index e3de515..2b7073d 100755 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ setup( # 'Django>=1.9', commented out to make `pip install -U` easier # 'django-admin-steroids', # Optional 'django-polymorphic', - 'django-shared-utils', + 'django-shared-utils>=0.2.5', ], dependency_links=[ 'git+https://github.com/sha-red/django-shared-utils.git#egg=django-shared-utils', diff --git a/shared/people/models.py b/shared/people/models.py index fc1d004..c9fecc9 100644 --- a/shared/people/models.py +++ b/shared/people/models.py @@ -10,7 +10,7 @@ from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from polymorphic.models import PolymorphicModel -from shared.utils.fields import AutoSlugField +from shared.utils.models.slugs import DowngradingSlugField from shared.utils.translation import get_translated_field from .controllers import PersonController @@ -60,7 +60,7 @@ class PseudonymMixin(models.Model): @python_2_unicode_compatible class BasePerson(PolymorphicModel): name = models.CharField(_("Name"), max_length=200, unique=True) - slug = AutoSlugField(_("URL-Name"), max_length=200, populate_from='name', unique_slug=True) + slug = DowngradingSlugField(_("URL-Name"), max_length=200, populate_from='name', unique_slug=True) sort_name = models.CharField(_("Name sortierbar"), blank=True, max_length=200) class Meta: