from django.contrib.contenttypes.fields import GenericRelation
from django.core.files.storage import FileSystemStorage
from django.utils.datastructures import SortedDict
-from fnpdjango.utils.text.slughifi import slughifi
+from slugify import slugify
from ssify import flush_ssi_includes
from catalogue.models.tag import prefetched_relations
# str.capitalize() is wrong, because it also lowers letters
objname = objname[0].upper() + objname[1:]
tag, created = catalogue.models.Tag.objects.get_or_create(
- slug=slughifi(objname), category='thing')
+ slug=slugify(objname), category='thing')
if created:
tag.name = objname
setattr(tag, 'name_%s' % lang, tag.name)
for motifs in part['themes']:
for motif in motifs.split(','):
tag, created = catalogue.models.Tag.objects.get_or_create(
- slug=slughifi(motif), category='theme')
+ slug=slugify(motif), category='theme')
if created:
tag.name = motif
tag.sort_key = sortify(tag.name)