mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Add customized links to page footer (#2685)
Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
This commit is contained in:
@@ -118,6 +118,10 @@ def _default_context(request):
|
||||
_footer += response
|
||||
else:
|
||||
_footer.append(response)
|
||||
_footer += request.event.cache.get_or_set('footer_links', lambda: [
|
||||
{'url': fl.url, 'label': fl.label}
|
||||
for fl in request.event.footer_links.all()
|
||||
], timeout=300)
|
||||
|
||||
if request.event.settings.presale_css_file:
|
||||
ctx['css_file'] = default_storage.url(request.event.settings.presale_css_file)
|
||||
@@ -158,6 +162,10 @@ def _default_context(request):
|
||||
ctx['organizer_logo'] = request.organizer.settings.get('organizer_logo_image', as_type=str, default='')[7:]
|
||||
ctx['organizer_homepage_text'] = request.organizer.settings.get('organizer_homepage_text', as_type=LazyI18nString)
|
||||
ctx['organizer'] = request.organizer
|
||||
_footer += request.organizer.cache.get_or_set('footer_links', lambda: [
|
||||
{'url': fl.url, 'label': fl.label}
|
||||
for fl in request.organizer.footer_links.all()
|
||||
], timeout=300)
|
||||
|
||||
ctx['html_head'] = "".join(h for h in _html_head if h)
|
||||
ctx['html_foot'] = "".join(h for h in _html_foot if h)
|
||||
|
||||
Reference in New Issue
Block a user