diff --git a/gestioncof/templates/event.html b/gestioncof/templates/gestioncof/event.html similarity index 69% rename from gestioncof/templates/event.html rename to gestioncof/templates/gestioncof/event.html index cc7d96d0..52f893db 100644 --- a/gestioncof/templates/event.html +++ b/gestioncof/templates/gestioncof/event.html @@ -2,9 +2,6 @@ {% block realcontent %}

Événement: {{ event.title }}

- {% if success %} -

Votre inscription a bien été enregistrée ! Vous pouvez cependant la modifier jusqu'à la fin des inscriptions.

- {% endif %} {% if event.details %}

{{ event.details }}

{% endif %} diff --git a/gestioncof/views.py b/gestioncof/views.py index 2a59bd14..ea0de7c8 100644 --- a/gestioncof/views.py +++ b/gestioncof/views.py @@ -224,8 +224,13 @@ def event(request, event_id): current_choices=current_registration.options) except EventRegistration.DoesNotExist: form = EventForm(event=event) - return render(request, "event.html", - {"event": event, "form": form, "success": success}) + # Messages + if success: + messages.success(request, "Votre inscription a bien été enregistrée ! " + "Vous pouvez cependant la modifier jusqu'à " + "la fin des inscriptions.") + return render(request, "gestioncof/event.html", + {"event": event, "form": form}) def clean_post_for_status(initial):