Skip to content

Commit

Permalink
Turn on build-ID processor and reactive cache decorator for jsi18n (b…
Browse files Browse the repository at this point in the history
…ug 576131)
  • Loading branch information
Joshua Gross committed Jul 21, 2010
1 parent c65fb85 commit e4fa127
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
'django.contrib.messages.context_processors.messages',

'sumo.context_processors.global_settings',
'jingo_minify.helpers.build_ids'
)

MIDDLEWARE_CLASSES = (
Expand Down
2 changes: 1 addition & 1 deletion templates/layout/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</div>{# /#footer-contents #}
</div>{# /#footer #}

<script src="{{ url('jsi18n') }}"></script>
<script src="{{ url('jsi18n') }}/build:{{ BUILD_ID_JS }}"></script>
{{ js('common') }}
{% for script in scripts %}
{{ js(script) }}
Expand Down
3 changes: 2 additions & 1 deletion urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.conf import settings
from django.contrib import admin
from django.views.i18n import javascript_catalog
from django.views.decorators.cache import cache_page

import authority

Expand All @@ -19,7 +20,7 @@
(r'^admin/', include('kadmin.urls')),

# Javascript translations.
url('^jsi18n/.*$', javascript_catalog,
url('^jsi18n/.*$', cache_page(60 * 60 * 24 * 365)(javascript_catalog),
{'domain': 'javascript', 'packages': ['kitsune']}, name='jsi18n'),
)

Expand Down

0 comments on commit e4fa127

Please sign in to comment.