You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 697B

12345678910111213141516171819202122
  1. {% extends "base.html" %}
  2. {% block title %}Index.html{% endblock %}
  3. {% block content %}
  4. <script>
  5. var es = new ReconnectingEventSource('/events/');
  6. es.addEventListener('message', function (e) {
  7. console.log(e.data);
  8. location.reload();
  9. }, false);
  10. </script>
  11. <form method="post">
  12. {% for n in notices %}
  13. <div>
  14. <p>Titel: {{ n.notice_title }}</p>
  15. <p>Text: {{ n.notice_text }}</p>
  16. <p><a href="{% url 'delete' deleteId=n.id %}" class="btn btn-danger" >Löschen</a></p>
  17. </div>
  18. {% endfor %}
  19. <p><a href="{% url 'new' %}" class="btn btn-info" role="button">Neue Nachricht</a></p>
  20. </form>
  21. {% endblock %}