Helpers

Template tags

statici18n

templatetags.statici18n.statici18n(locale)

New in version 0.4.

Warning

Behind the scenes, it’s a thin wrapper around staticfiles’s static template tag. Therefore, it requires either django-staticfiles>=1.1 or Django=>1.4 to work.

Builds the full Javascript catalog URL for the given locale, by joining the STATICI18N_OUTPUT_DIR and STATICI18N_FILENAME_FUNCTION settings:

{% load statici18n %}
<script src="{% statici18n LANGUAGE_CODE %}"></script>

This is especially useful when using a non-local storage backend to deploy files to a CDN or when using cache busting to serve files.

Table Of Contents

Previous topic

Management Commands

Next topic

Settings

This Page