into/postscript => about/imprint

This commit is contained in:
j 2022-05-03 13:13:07 +01:00
parent 2170a219f5
commit 108aa4a710
2 changed files with 8 additions and 7 deletions

View file

@ -11,7 +11,8 @@ def events(request, slug=''):
context = {} context = {}
context['settings'] = settings context['settings'] = settings
context['events'] = Event.objects.all().order_by('position') context['events'] = Event.objects.all().order_by('position')
context['intro'], c = Page.objects.get_or_create(slug='intro') context['about'], c = Page.objects.get_or_create(slug='about')
context['imprint'], c = Page.objects.get_or_create(slug='imprint')
return render(request, 'events.html', context) return render(request, 'events.html', context)

View file

@ -2,12 +2,12 @@
{% block title %}{{ settings.title }}{% endblock title %} {% block title %}{{ settings.title }}{% endblock title %}
{% block main %} {% block main %}
<div class="index"> <div class="index">
<div class="intro"> <div class="about">
{{ intro.body | safe }} {{ about.body | safe }}
</div> </div>
{% if request.user.is_staff %} {% if request.user.is_staff %}
<div class="menu"> <div class="menu">
[<a href="admin/page/page/{{ intro.id }}/change/">edit</a>] [<a href="admin/page/page/{{ about.id }}/change/">edit</a>]
</div> </div>
{% endif %} {% endif %}
<div class="events"> <div class="events">
@ -37,12 +37,12 @@
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
<div class="postscript"> <div class="imprint">
{{ postscript.body | safe }} {{ imprint.body | safe }}
</div> </div>
{% if request.user.is_staff %} {% if request.user.is_staff %}
<div class="menu"> <div class="menu">
[<a href="admin/page/page/{{ postscript.id }}/change/">edit</a>] [<a href="admin/page/page/{{ imprint.id }}/change/">edit</a>]
</div> </div>
{% endif %} {% endif %}
</div> </div>