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 924B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {% extends 'base.html' %}
  2. {% block title %}
  3. Index
  4. {% endblock %}
  5. {% block content %}
  6. <h1>Index der Applikation</h1>
  7. <form action="/posts" method="POST">
  8. {% for notice in notices %}
  9. <div>
  10. <p>published: {{ notice.pub_start }}</p>
  11. <h2><a href="">{{ notice.notice_title }}</a></h2>
  12. <p>{{ notice.notice_text|linebreaksbr }}</p>
  13. <p>
  14. <a href="{% url 'delete' deleteId=notice.id %}" class="btn btn-danger">
  15. Meldung löschen
  16. </a>
  17. </p>
  18. </div>
  19. {% endfor %}
  20. <div>
  21. <p>
  22. <a href="{% url 'new' %}" class="btn btn-info" role="button">Neue Nachricht</a>
  23. </p>
  24. </div>
  25. <script>
  26. var es = new ReconnectingEventSource('/events/');
  27. es.addEventListener('message', function (e) {console.log(e.data);location.reload();}, false);
  28. </script>
  29. </form>
  30. {% endblock %}