mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Added hook for links in the footer
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from django.conf import settings
|
||||
from django.core.urlresolvers import Resolver404, resolve
|
||||
|
||||
from .signals import html_head
|
||||
from .signals import footer_link, html_head
|
||||
|
||||
|
||||
def contextprocessor(request):
|
||||
@@ -18,10 +18,14 @@ def contextprocessor(request):
|
||||
ctx = {
|
||||
}
|
||||
_html_head = []
|
||||
_footer = []
|
||||
if hasattr(request, 'event'):
|
||||
for receiver, response in html_head.send(request.event, request=request):
|
||||
_html_head.append(response)
|
||||
for receiver, response in footer_link.send(request.event, request=request):
|
||||
_footer.append(response)
|
||||
ctx['html_head'] = "".join(_html_head)
|
||||
ctx['footer'] = _footer
|
||||
ctx['site_url'] = settings.SITE_URL
|
||||
|
||||
return ctx
|
||||
|
||||
Reference in New Issue
Block a user