Fix broken urls in propositions

This commit is contained in:
Martin Pépin 2020-01-04 00:01:16 +01:00
parent 1176bb1eec
commit 5e5ca11115
No known key found for this signature in database
GPG key ID: E7520278B1774448

View file

@ -53,13 +53,13 @@ def repoui(request, id):
rep.save()
prop.nboui += 1
prop.save()
return redirect('propositions.views.liste')
return redirect("propositions:list")
class PropDelete(DeleteView):
model = Prop
template_name = "propositions/delete.html"
success_url = reverse_lazy(liste)
success_url = reverse_lazy("propositions:list")
@method_decorator(login_required)
def dispatch(self, *args, **kwargs):
@ -70,7 +70,7 @@ class PropDelete(DeleteView):
success_url = self.get_success_url()
if not ((self.object.user == self.request.user.profile)
or self.request.user.profile.is_chef):
return redirect('propositions.views.liste')
return redirect("propositions:list")
else:
self.object.delete()
return HttpResponseRedirect(success_url)
@ -104,4 +104,4 @@ def repnon(request, id):
rep.save()
prop.nbnon += 1
prop.save()
return redirect('propositions.views.liste')
return redirect("propositions:list")