Snippet List
Caches a view based on the users language code, a cache_key and optional
function arguments. The cache_key can be a string, a callable or None. If
it's None, the the name of the decorated function is used.
You can pass a tuple `func_args` of arguments. If passed, these arguments
are part of the cache key. See examples for details.
Looks up for a template based on the template-name plus the current users language code. Loads the template and renders it with the current context.
Example::
{% langinclude "foo/some_include.html" %}
Based on the users LANGUAGE_CODE, assumed we have 'de', it tries to render the template 'foo/some_include.html.de'. If that doesn't exists, it renders the template 'foo/some_include.html'. This is the default behavior of the include-Tag.
Basically this is a shortcut for the following code, just with a fallback for the default template::
{% ifequal LANGUAGE_CODE "de" %}
{% include "foo/some_include.html.de" %}
{% else %}
{% include "foo/some_include.html" %}
{% endifequal %}
---
Ein deutscher [Weblogeintrag mit Beschreibung](http://www.mahner.org/weblog/sprachabhangige-template-imports/)
- templatetag
- i18n
- language
- include
Add the attribute "rel='lightbox'" to all Links, if the target is an image.
`<a href="/path/to/image.jpg">Image</a>`
becomes
`<a rel="lightbox" href="/path/to/image.jpg">Image</a>`
Works for JPG, GIF and PNG Files.
- filter
- re
- lightbox
- regular-expression
bartTC has posted 6 snippets.