Browse Source

Use DowngradingSlugField

master 0.4.1
Erik Stein 7 years ago
parent
commit
ed33b00dcc
  1. 2
      CHANGES
  2. 2
      setup.py
  3. 4
      shared/people/models.py

2
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.

2
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',

4
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:

Loading…
Cancel
Save