ref(piaf): meilleur usage du décorateur
Parent
2417acbe39
révision
6161c7b283
|
@ -199,14 +199,11 @@ class PrepareMergedInvoices(PrepareInvoice):
|
|||
return context
|
||||
|
||||
|
||||
@method_decorator(csrf_exempt, name='dispatch')
|
||||
class PaidInvoice(mixins.RestrictToTipiHost, generic.edit.FormView):
|
||||
http_method_names = ['post']
|
||||
form_class = forms.PaidInvoiceForm
|
||||
|
||||
@method_decorator(csrf_exempt)
|
||||
def dispatch(self, *args, **kwargs):
|
||||
return super().dispatch(*args, **kwargs)
|
||||
|
||||
def form_invalid(self, form):
|
||||
return HttpResponse("KO.", content_type="text/plain")
|
||||
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket