fmartingr
/
shelfzilla
Archived
1
0
Fork 0
This commit is contained in:
Felipe Martín 2014-08-26 18:44:19 +02:00
parent 4b5f603e81
commit 79a209fb99
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,4 @@
from shelfzilla.apps.config.models import SiteConfiguration
from .models import User
@ -8,10 +9,17 @@ def user_is_staff(request):
def user_configuration(request):
# TODO improve this shit
use_pjax = True
config = SiteConfiguration.objects.get()
if not config.use_pjax:
use_pjax = False
return {
'USER_CONFIG': {
'show_admin_links': False
}
'show_admin_links': False,
'use_pjax': use_pjax
},
}
def auth(request):

View File

@ -109,6 +109,9 @@
<script type="text/coffeescript" src="{% static "coffee/main.coffee" %}"></script>
{% endblock %}
{% endcompress %}
{% if not USER_CONFIG.use_pjax %}
<script type="text/javascript">$(function() { window.updateMessages(); });</script>
{% endif %}
{% if social_config.google_analytics %}
{% include "_includes/google_analytics.html" %}