X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3e569a771ed8cb9ab7156425ff870dc9d33ef023..6fdfad14e49e9b8fc4e01c71317fe98ff9c10574:/apps/catalogue/migrations/0003_from_hg.py diff --git a/apps/catalogue/migrations/0003_from_hg.py b/apps/catalogue/migrations/0003_from_hg.py index c0b4dad8..e542d508 100644 --- a/apps/catalogue/migrations/0003_from_hg.py +++ b/apps/catalogue/migrations/0003_from_hg.py @@ -11,7 +11,7 @@ from south.db import db from south.v2 import DataMigration from django.conf import settings -from fnpdjango.utils.text.slughifi import slughifi +from slugify import slugify META_REGEX = re.compile(r'\s*', re.DOTALL | re.MULTILINE) STAGE_TAGS_RE = re.compile(r'^#stage-finished: (.*)$', re.MULTILINE) @@ -54,7 +54,7 @@ def gallery(slug, text): except ValueError: continue - gallery = result.get('gallery', slughifi(slug)) + gallery = result.get('gallery', slugify(slug)) if gallery.startswith('/'): gallery = os.path.basename(gallery) @@ -68,7 +68,7 @@ def migrate_file_from_hg(orm, fname, entry): if fname.endswith('.xml'): fname = fname[:-4] title = file_to_title(fname) - fname = slughifi(fname) + fname = slugify(fname) # create all the needed objects # what if it already exists?