How to automatically create a user in django
I’m trying to create an application form so that people who would like to work for us can apply to our organization. I had a conversation with my client and he doesn’t want new employees to create their own user login info. Instead, he wants me to create an admin page where he’ll accept or decline applicants. If he accepts an applicant, it’ll automatically create user login info, and email that applicant their login info. The user will of course be able to change their login info once they enter their account. How can this be done?
Django Admin automatically logs me out when i click the save button and won’t allow me log in again
Whenever I click the save button to add user on the django admin interface, it automatically logs me out and won’t re-authenticate me despite being the superuser.
The design pattern: I created a class called CustomUser which inherited the django AbstractUser and another class UserProfile model which has OneToOneField to the settings.AUTH_USER_MODEL(main.CustomUser) and added some common fields among the student, parent and staff(e.g other_name), then student, staff and parent class inherited the UserProfile and I added their specific field. So I do add a user first, then go to the student model to add the user as a student.
main is my app_name.