CSRF verification failed in form - xblock

I’m getting a CSRF verification failed message when trying to make a simple form . I did a little research into what CSRF verification actually is, and to my knowledge, in order to use it you need:
csrf_token tags in html, and I added it
also I add :

MIDDLEWARE_CLASSES = ( ... 'django.middleware.csrf.CsrfViewMiddleware', )

Any help please

Can you try to include csrf token in your form ?

You’ll find examples of how to in existing forms.

It could be that you’ll not need middleware class, just adding the token in your form should do it mostly.

1 Like

Yes I delete it and it work’s, Thanks

1 Like