- Go the directory of the project through the terminal.
- Type
python manage.py shell
to enter the Django shell. - Type
from login.models import CustomUser
to import theCustomUser
class defined in a model. - Then, type
CustomUser.objects.create_user(username=yourusername, password=yourpassword, emailadd=youremail@address, user_privileges=[1(for superadmin), 2(for admin), 3(for faculty), 4(for student)])
Now you can login to the site with the user you created.