Fix broken urls in propositions
This commit is contained in:
parent
1176bb1eec
commit
5e5ca11115
1 changed files with 4 additions and 4 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue