let's see if unidecode can help here
This commit is contained in:
parent
7fa35f3300
commit
4e15a4c77b
|
@ -5,6 +5,7 @@ from django.utils.text import slugify
|
|||
|
||||
from utils.models import CreatedUpdatedModel
|
||||
|
||||
from unidecode import unidecode
|
||||
|
||||
class EventType(CreatedUpdatedModel):
|
||||
""" Every event needs to have a type. """
|
||||
|
@ -35,7 +36,7 @@ class Event(CreatedUpdatedModel):
|
|||
|
||||
def save(self, **kwargs):
|
||||
if not self.slug:
|
||||
self.slug = slugify(self.title)
|
||||
self.slug = slugify(unidecode(self.title))
|
||||
super(Event, self).save(**kwargs)
|
||||
|
||||
|
||||
|
@ -60,6 +61,6 @@ class Speaker(CreatedUpdatedModel):
|
|||
|
||||
def save(self, **kwargs):
|
||||
if not self.slug:
|
||||
self.slug = slugify(self.name)
|
||||
self.slug = slugify(unidecode(self.name))
|
||||
super(Speaker, self).save(**kwargs)
|
||||
|
||||
|
|
|
@ -7,4 +7,5 @@ PyPDF2>=1.25.1
|
|||
django-wkhtmltopdf>=3.0.0
|
||||
Pillow==3.2.0
|
||||
qrcode==5.3
|
||||
CommonMark==0.6.4
|
||||
CommonMark==0.6.4
|
||||
Unidecode==0.4.19
|
||||
|
|
Loading…
Reference in a new issue