Add signal html_page_start

This commit is contained in:
Raphael Michel
2018-08-11 12:52:46 +02:00
parent e645a350f2
commit 693965af28
3 changed files with 31 additions and 0 deletions

View File

@@ -12,6 +12,16 @@ This signal is sent out to build configuration forms for all restriction formset
As with all plugin signals, the ``sender`` keyword argument will contain the event.
"""
html_page_start = Signal(
providing_args=[]
)
"""
This signal allows you to put code in the beginning of the main page for every
page in the backend. You are expected to return HTML.
The ``sender`` keyword argument will contain the request.
"""
html_head = EventPluginSignal(
providing_args=["request"]
)

View File

@@ -3,6 +3,7 @@
{% load i18n %}
{% load hijack_tags %}
{% load statici18n %}
{% load eventsignal %}
{% load eventurl %}
<!DOCTYPE html>
<html>
@@ -329,6 +330,7 @@
{% endif %}
<div id="page-wrapper">
<div class="container-fluid">
{% signal "pretix.control.signals.html_page_start" request %}
{% if messages %}
{% for message in messages %}
<div class="alert {{ message.tags }}">