import-keshav / khoj

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KHOJ

Steps for creating superuser

Run following command in your terminal
python manage.py createsuperuser
Now open django shell and run the following commands
python manage.py shell

Now add following commands in shell
from django.contrib.auth.models import User

Now get the object of the following user
user = User.objects.all()[0]
The above command would return 1st user present in the database

Now do the following operations on the objects user.is_staff = True
user.is_verified = True
user.is_verified = True
user.is_active = True
user.save()
Exit the terminal
exit()

Now the superuser has been created succesfully

About


Languages

Language:HTML 50.7%Language:Python 48.9%Language:JavaScript 0.4%