Fix #30 -- Event microdata information (#546)

* Addition of all basics required for microdata

Microdata for event added to the head of the base event html template.

* Fixed flake8 errors & included settings checks

Fixed the flake8 too many blank line errors and changed the date and time section to refer to settings before including the time and/or the date_to.

* Typo in last commit

Fixed typo in last commit

* Fixed bracket mistake and flake8 error

Fixed tab between { and % in template tag. Removed extra lines. Removed unnecessary str() call.
Corrected binary & to [and] operator.

* Added testing for microdata

Testing added to the presale.test_event tests to cover the 4 branches and basic microdata functionality.
This commit is contained in:
Joepriesto
2017-07-16 16:42:46 +01:00
committed by Raphael Michel
parent 9582f8380f
commit 27b73227ed
3 changed files with 71 additions and 0 deletions

View File

@@ -30,6 +30,13 @@
<script type="text/javascript" src="{% static "pretixpresale/js/ui/typocheck.js" %}"></script>
<script type="text/javascript" src="{% static "lightbox/js/lightbox.min.js" %}"></script>
{% endcompress %}
{% if event %}
{% autoescape off %}
<script type="application/ld+json">
{{ event.event_microdata }}
</script>
{% endautoescape %}
{% endif %}
<meta name="referrer" content="origin">
{{ html_head|safe }}
<meta name="viewport" content="width=device-width, initial-scale=1">