let's see if unidecode can help here

This commit is contained in:
Thomas Steen Rasmussen 2016-08-08 21:47:53 +02:00
parent 7fa35f3300
commit 4e15a4c77b
2 changed files with 5 additions and 3 deletions

View file

@ -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)

View file

@ -8,3 +8,4 @@ django-wkhtmltopdf>=3.0.0
Pillow==3.2.0
qrcode==5.3
CommonMark==0.6.4
Unidecode==0.4.19