Fixed duplicate execution of process_response

This commit is contained in:
Raphael Michel
2016-09-26 15:12:05 +02:00
parent 68987970bf
commit ba32298602
2 changed files with 5 additions and 9 deletions

View File

@@ -1,6 +1,5 @@
from django.conf import settings
from django.core.files.storage import default_storage
from django.core.urlresolvers import Resolver404, resolve
from .signals import footer_link, html_head
@@ -9,11 +8,7 @@ def contextprocessor(request):
"""
Adds data to all template contexts
"""
try:
url = resolve(request.path_info)
except Resolver404:
return {}
if url.namespace != 'presale':
if request.path.startswith('/control'):
return {}
ctx = {
@@ -30,6 +25,7 @@ def contextprocessor(request):
if request.event.settings.presale_css_file:
ctx['css_file'] = default_storage.url(request.event.settings.presale_css_file)
ctx['event_logo'] = request.event.settings.get('logo_image', as_type=str, default='')[7:]
ctx['event'] = request.event
ctx['html_head'] = "".join(_html_head)
ctx['footer'] = _footer