Answer the question
In order to leave comments, you need to log in
How to create an anonymous user in Django?
Good afternoon.
There is an authorization on the django site.
There was a need for empty values "username" and "password" in the authorization window when clicking on the "login" button, to log in to the site as a normal user.
I tried to create a user with an empty login and password through the django admin, but django does not allow.
I will be grateful for the answers, recommendations, links =)
Answer the question
In order to leave comments, you need to log in
1. Create a user with login and password guest
2. Redefine the authorization function. By adding a check for empty fields.
if логин и пароль пришли пустые:
авторизовать под пользователем с ID вашего юзера guest
else:
обычная валидация формы
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question