Skip to content

Commit

Permalink
Formally fixes #1 by adding the ability to specify a transliteration …
Browse files Browse the repository at this point in the history
…function.
  • Loading branch information
coordt committed Feb 15, 2012
1 parent 96a3f61 commit 97c14b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc_src/reference/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
=================

Expand Down

0 comments on commit 97c14b1

Please sign in to comment.