Posts

Which command is used to create a superuser in Django?

Image
  When we define models for an app, the Django  admin creates a superuser  which makes it easy for us to work with our models through the admin site. A site’s administrators use the admin site, not a site’s general users. Now we’ll set up the admin site and use it to add some questions through the Question model. Creating a superuser Django allows you to create a user who has all privileges available on the site, called a superuser. A privilege controls the actions a user can take. The most restrictive privilege settings allow a user to only read public information on the site. Registered users typically have the privilege of reading their own private data and some selected information available only to members. To effectively administer a web application, the site owner usually needs access to all information stored on the site. To create a superuser in Django, enter the following command and respond to the prompts: (pollsite_env) C:\Projects\PollSite>python manage.py...