Forbidden (403) - CSRF verification failed. Request aborted.

Yametazamwa mara 1,071
Ruka hadi kwenye ujumbe wa kwanza ambao haujasomwa

Carlos Roberto

hayajasomwa,
22 Nov 2022, 18:58:4122/11/2022
kwa Django users
Hi everyone!

I use ngrok to make my projects available in django. I'm having trouble accessing the admin page. After I enter the username and password I get the error 403.

Has anyone had the same problem and could help me?

Regards


Chukwudi Onwusa

hayajasomwa,
22 Nov 2022, 21:03:4922/11/2022
kwa django...@googlegroups.com
Check your template, immediately after the <form> opening tag add  
{% csrf_token %}
If you have it already, kindly check to ensure it's correctly spelt and placed and then restart your server.
Best Regards.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%40googlegroups.com.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%40googlegroups.com.

Nagaraja Tuticorin

hayajasomwa,
23 Nov 2022, 09:22:0623/11/2022
kwa django...@googlegroups.com
Make your database as a public make format of database chmod www-data=www-data ./filename 

Nagaraja Tuticorin

hayajasomwa,
23 Nov 2022, 09:22:1423/11/2022
kwa django...@googlegroups.com
Make your database as a public make format of database chmod www-data=www-data ./filename 

Mark Gensler

hayajasomwa,
25 Nov 2022, 11:58:5925/11/2022
kwa Django users
Try adding your ngrok domain to the list of CSRF_TRUSTED_ORIGINS: https://docs.djangoproject.com/en/4.1/ref/settings/#csrf-trusted-origins

E.g. assuming you're using https:

CSRF_TRUSTED_ORIGINS = ["https://*.ngrok.io"]
Jibu wote
Mjibu mchapishaji
Sambaza
Ujumbe 0 mpya