X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5780495e13ec2d55bc2dee96dec372a9ea395462..28eed140e4dde5ae3ec206c47a6d5f30f0296607:/apps/wiki/models.py?ds=inline 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):