X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5780495e13ec2d55bc2dee96dec372a9ea395462..1424bfacd82ffc238f90f1baa99388fc1ac9f2e7:/apps/wiki/models.py diff --git a/apps/wiki/models.py b/apps/wiki/models.py index d2b74605..acad2c3d 100644 --- a/apps/wiki/models.py +++ b/apps/wiki/models.py @@ -15,12 +15,13 @@ from django.http import Http404 import logging logger = logging.getLogger("fnp.wiki") -_PCHARS_DICT = dict(zip((ord(x) for x in u"ĄĆĘŁŃÓŚŻŹąćęłńóśżź "), u"ACELNOSZZacelnoszz_")) + +# _PCHARS_DICT = dict(zip((ord(x) for x in u"ĄĆĘŁŃÓŚŻŹąćęłńóśżź "), u"ACELNOSZZacelnoszz_")) +_PCHARS_DICT = dict(zip((ord(x) for x in u" "), u"_")) # I know this is barbaric, but I didn't find a better solution ;( def split_name(name): parts = name.translate(_PCHARS_DICT).split('__') - logger.info("SPLIT %r -> %r", name, parts) return parts def join_name(*parts, **kwargs):