From 97c14b19ea941b57929a74bee39e97b456c48d41 Mon Sep 17 00:00:00 2001 From: Corey Oordt Date: Tue, 7 Feb 2012 13:40:29 -0500 Subject: [PATCH] Formally fixes #1 by adding the ability to specify a transliteration function. --- doc_src/reference/settings.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc_src/reference/settings.rst b/doc_src/reference/settings.rst index 94f1ac3..a6c5a2c 100644 --- a/doc_src/reference/settings.rst +++ b/doc_src/reference/settings.rst @@ -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 `_. Use it by setting ``SLUG_TRANSLITERATOR`` to ``'unidecode.unidecode``. + CACHE_VIEW_LENGTH =================