Přidán {{form.media}} rovnou do hlavičky všeho

Stejně je často potřeba (libovolný autocomplete) a akorát hrozí, že se
na to zapomene.
This commit is contained in:
Pavel "LEdoian" Turinsky 2021-01-26 21:01:31 +01:00
parent d35aeaa396
commit ba8cd2e297
4 changed files with 4 additions and 6 deletions

View file

@ -31,6 +31,10 @@
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script> </script>
{# Případné skripty widgetů formulářů #}
{% if form %}
{{form.media}}
{% endif %}
{# script specifický pro stránku #} {# script specifický pro stránku #}
{% block script %}{% endblock %} {% block script %}{% endblock %}

View file

@ -2,8 +2,6 @@
{% load staticfiles %} {% load staticfiles %}
{% block script %} {% block script %}
<!--script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script!-->
{{form.media}}
<script src="{% static 'seminar/prihlaska.js' %}"></script> <script src="{% static 'seminar/prihlaska.js' %}"></script>
{% endblock %} {% endblock %}

View file

@ -1,8 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load staticfiles %} {% load staticfiles %}
{% block script %} {% block script %}
<!--script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script!-->
{{form.media}}
<script src="{% static 'seminar/dynamic_formsets.js' %}"></script> <script src="{% static 'seminar/dynamic_formsets.js' %}"></script>
{% endblock %} {% endblock %}

View file

@ -2,8 +2,6 @@
{% load staticfiles %} {% load staticfiles %}
{% block script %} {% block script %}
<!--script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script!-->
{{form.media}}
<script src="{% static 'seminar/prihlaska.js' %}"></script> <script src="{% static 'seminar/prihlaska.js' %}"></script>
{% endblock %} {% endblock %}