Student Management System is a system for Students where Students can check their details. In this system, a Admin Panel is included where admin ca...
For further actions, you may consider blocking this person and/or reporting abuse
The model is wrong or incomplete students and teachers would never be able to log in this way. looks like code made by some AI. There is no relation to the Django user model.
Explain the problem
After rereading the code I see that you are using many bad practices, the sections to validate the user, you do not use the authentication provided by Django. this has a big security problem. When the student or admin user tries to start the section, the information will be sent without encrypting this, anyone on the network can capture that password because django forms are not used with its passwordInput widget. remember that passwords have to be encoded in the database, which is not the case with your student model. You use a lot of bad practices, the correct way to do this is with AbstractUser or AbstractBaseUser, use a login form with a passwordInput widget (the information is sent encrypted) and use a CustomUserManager that when creating the user calls user.set_password( password) in this way the password is encoded in the database, you comply with European regulations and protect the personal information of users.
So I have to use-
Authentication and Autherization
AbstractUser or AbstractBaseUser
Yes, that would be the correct way. You can also add a OneToOneField to the student and teacher model, that way you can keep the models you already have. I will leave you the best tutorial that explains this whole topic very well: simpleisbetterthancomplex.com/tuto...
did you finished the "college management system" project ?
can you share the code with me ?
i also want to learn and build "college management system" type projects
did you finished the "college management system" project ?
can you share the code with me ?
i also want to learn and build "college management system" type projects
How can admin login ?
I'm trying to log in with the email and password I created
python manage.py createsuperuser
which does not happen, the page is not updated
authorization by the administrator does not occur
there is no transition to the page 127.0.0.1:8000/admin_panel/dashboard
Here is adminLogin function views.py file. You have to use admin@gmail.com for the email and admin@123 for the password.
some problem in this code ....please help
what problem? Explain me.