Formally fixes #1 by adding the ability to specify a transliteration function.

This commit is contained in:
Corey Oordt 2012-02-07 13:40:29 -05:00
parent 96a3f61928
commit 97c14b19ea

View file

@ -18,6 +18,7 @@ The default settings are:
'FK_REGISTRY': {},
'THUMBNAIL_UPLOAD_PATH': 'uploads/categories/thumbnails',
'THUMBNAIL_STORAGE': settings.DEFAULT_FILE_STORAGE,
'SLUG_TRANSLITERATOR': lambda x: x,
}
ALLOW_SLUG_CHANGE
@ -27,6 +28,15 @@ ALLOW_SLUG_CHANGE
**Description:** Changing the slug for a category can have serious consequences if it is used as part of a URL. Setting this to ``True`` will allow users to change the slug of a category.
SLUG_TRANSLITERATOR
===================
**Default:** ``lambda x: x``
**Description:** Allows the specification of a function to convert non-ASCII characters in the potential slug to ASCII characters. Allows specifying a ``callable()`` or a string in the form of ``'path.to.module.function'``.
A great tool for this is `Unidecode <http://pypi.python.org/pypi/Unidecode>`_. Use it by setting ``SLUG_TRANSLITERATOR`` to ``'unidecode.unidecode``.
CACHE_VIEW_LENGTH
=================