Login

Tag "translat"

Snippet List

autotranslatslugify

Changes **all slugify calls** to support translat automatically, behind the scenes. Using this one doesn't have to change any models or code to make it work everywhere. Create new project, I call it myself *autoslugifytranslat*, and add the following to project's `__init__.py` file. It will automatically add translat slugify support for all default slugify calls. This script is depending on the fact that slugify function in Django is always in *django.template.defaultfilters.slugify*. **Note:** The snippet is supposed to have "ä","Ä" and "ö","Ö" in the `char_translat` list, but djangosnippets does not let me put ä's and ö's to the code part!

  • i18n
  • slugify
  • translat
  • internal
Read More

1 snippet posted so far.