From 63aad60260e5990dbd57428f548a7ab0d6570016 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Fri, 29 Nov 2024 19:37:47 +0100 Subject: [PATCH] =?UTF-8?q?On=20supprime=20une=20m=C3=A9thode=20qui=20n'es?= =?UTF-8?q?t=20plus=20utilis=C3=A9e=20depuis=20longtemps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/views.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index a70189a..2049ea6 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -530,25 +530,6 @@ class EventCreateView(SuccessMessageMixin, CreateView): return super().form_valid(form) -def import_from_details(request): - form = EventForm(request.POST, is_authenticated=request.user.is_authenticated) - if form.is_valid(): - new_event = form.save() - if request.user.is_authenticated: - messages.success(request, _("The event is saved.")) - return HttpResponseRedirect(new_event.get_absolute_url()) - else: - messages.success( - request, - _( - "The event has been submitted and will be published as soon as it has been validated by the moderation team." - ), - ) - return HttpResponseRedirect(reverse("home")) - else: - return render( - request, "agenda_culturel/event_form.html", context={"form": form} - ) # A class to evaluate the URL according to the existing events and the authentification # level of the user