Added runtime SASS compliation and color settings

This commit is contained in:
Raphael Michel
2016-07-29 20:15:13 +02:00
parent 1b3cacb196
commit d32c1bd9c8
17 changed files with 170 additions and 6 deletions

View File

@@ -1,4 +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
@@ -16,6 +17,7 @@ def contextprocessor(request):
return {}
ctx = {
'css_file': None
}
_html_head = []
_footer = []
@@ -24,6 +26,10 @@ def contextprocessor(request):
_html_head.append(response)
for receiver, response in footer_link.send(request.event, request=request):
_footer.append(response)
if request.event.settings.presale_css_file:
ctx['css_file'] = default_storage.url(request.event.settings.presale_css_file)
ctx['html_head'] = "".join(_html_head)
ctx['footer'] = _footer
ctx['site_url'] = settings.SITE_URL