Причудливый сценарий ошибки входа в систему/сеанса с Django

Если кто-нибудь может помочь, я буду очень благодарна, я так запуталась и ошарашена.

Сценарий

  1. When we create a user on our sign up page, it redirects to the profile page where we can view all the attributes of the user, like it should.

    Creating a new user

    Getting Redirected after creating new

  2. Since we have not implemented logout yet, on a new incognito browser (to start a clean session with no pre-existing variables) we log in using an existing admin, we can see the user entry as well in the database.

Однако теперь, когда мы используем другую новую вкладку инкогнито для входа в этого нового пользователя, django отказывается регистрировать нас, и мы получаем ошибку 403 forbidden и перенаправляемся на страницу ошибки httpresponse.

  1. Here is the bizzare part, when we change the password through the user table on the admin page, then decide to login again using a new incognito browser, it logs us in. We thought it was a problem with the password, so we got rid of the hash to see the raw password. So we tried again with a new user, confirming the password was the same.

  2. Also, when we log in to an account that has admin rights it works and does not deny entry.

  3. We also thought, it was because when we sign up the lack of choosing hobbies was affecting, it but when we changed it manually through the admin page before logging in it still did not fix it.

Код представления входа

Подписаться Посмотреть код

Подписанный код представления

Форма входа и регистрации

Вернуться на верх