On supprime une méthode qui n'est plus utilisée depuis longtemps
This commit is contained in:
parent
27bce22670
commit
63aad60260
@ -530,25 +530,6 @@ class EventCreateView(SuccessMessageMixin, CreateView):
|
|||||||
return super().form_valid(form)
|
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
|
# A class to evaluate the URL according to the existing events and the authentification
|
||||||
# level of the user
|
# level of the user
|
||||||
|
Loading…
Reference in New Issue
Block a user