Fix redirect to index

This commit is contained in:
Midgard 2020-07-22 04:27:18 +02:00
parent 32b443cc81
commit 5d5dd4febd
Signed by: midgard
GPG key ID: 511C112F1331BBB4
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
{% block content %}
<ul>
{% for event in events %}
<li>{{ event.date }} {{ event.time_str }} (maximum {{ event.capacity }} mensen)
<li id="{{event.id}}">{{ event.date }} {{ event.time_str }} (maximum {{ event.capacity }} mensen)
<ul>
<form action="{% url 'events:register' event.id %}" method="post">
{% csrf_token %}

View file

@ -29,4 +29,4 @@ def register(request, event_id):
# event=event,
# user=CustomUser.objects.get(),
# )
return HttpResponseRedirect(reverse("events:index", args=(event.id,)))
return HttpResponseRedirect(reverse("events:index") + f"#{event.id}")