mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Added runtime SASS compliation and color settings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user