Show More
@@ -25,7 +25,7 b'' | |||
|
25 | 25 | <script src="{% static 'js/jquery-2.0.1.min.js' %}"></script> |
|
26 | 26 | <script src="{% static 'js/jquery-ui-1.10.3.custom.min.js' %}"></script> |
|
27 | 27 | <script src="{% static 'js/jquery.mousewheel.js' %}"></script> |
|
28 |
<script src="{% url ' |
|
|
28 | <script src="{% url 'js_info_dict' %}"></script> | |
|
29 | 29 | <script src="{% static 'js/panel.js' %}"></script> |
|
30 | 30 | <script src="{% static 'js/popup.js' %}"></script> |
|
31 | 31 | <script src="{% static 'js/image.js' %}"></script> |
@@ -49,7 +49,7 b" urlpatterns = patterns(''," | |||
|
49 | 49 | url(r'^thread/(?P<post_id>\w+)/rss/$', ThreadPostsFeed()), |
|
50 | 50 | |
|
51 | 51 | # i18n |
|
52 |
url(r'^jsi18n/$', ' |
|
|
52 | url(r'^jsi18n/$', 'boards.views.cached_js_catalog', js_info_dict, name='js_info_dict'), | |
|
53 | 53 | |
|
54 | 54 | # API |
|
55 | 55 | url(r'^api/post/(?P<post_id>\w+)/$', views.get_post, name="get_post"), |
@@ -13,6 +13,8 b' from django.template import RequestConte' | |||
|
13 | 13 | from django.shortcuts import render, redirect, get_object_or_404 |
|
14 | 14 | from django.utils import timezone |
|
15 | 15 | from django.db import transaction |
|
16 | from django.views.decorators.cache import cache_page | |
|
17 | from django.views.i18n import javascript_catalog | |
|
16 | 18 | |
|
17 | 19 | from boards import forms |
|
18 | 20 | import boards |
@@ -447,6 +449,10 b' def get_post(request, post_id):' | |||
|
447 | 449 | |
|
448 | 450 | return render(request, 'boards/post.html', context) |
|
449 | 451 | |
|
452 | @cache_page(86400) | |
|
453 | def cached_js_catalog(request, domain='djangojs', packages=None): | |
|
454 | return javascript_catalog(request, domain, packages) | |
|
455 | ||
|
450 | 456 | |
|
451 | 457 | def _get_theme(request, user=None): |
|
452 | 458 | """Get user's CSS theme""" |
General Comments 0
You need to be logged in to leave comments.
Login now