I'm trying to do a curl POST request on a wagtail page. Unfortunately I hit the CSRF protection.
I tried to disabled CSRF on this specific type of page using the @csrf_exempt
decorator, without success.
Here is my pseudo code (one of many attemps):
@method_decorator(csrf_exempt, name='serve')
class NewsletterPage(MedorPage):
class Meta:
verbose_name = _("newsletter page")
Seems like the csrf verifition is done even before the serve
method is called.
Any idea?
thanks