In this section of the course we're going to be enabling the Django admin on
our project the Django admin is a really useful tool that allows you to create an
administrative website for your project that lets you manage your database
models this makes it really easy to inspect the database see models and
modify them
Before we can use the Django admin we need to create a super user a
super user is a user with the maximum privileges over our database
We're going
to be creating a super user in this video using the Django command line tool
start by opening up the terminal window and navigating to our project the
profiles REST API then type vagrant SSH or if vagrant isn't already started run
vagrant up and then vagrant SSH to connect to the development server once
you're on the server type cd forward slash vagrant to switch to the vagrant
directory and then type source tilde forward slash env slash bin slash activate
to activate our Python virtual environment
Once you're on the virtual
environment we can then use the Django manage command to create a super user
simply type Python manage dot py create super user all one word and hit enter it
will prompt you to enter an email address and I recommend you use your own
email address I'm going to use mark@londonappdev.com and then a name I'm
just going to put mark and then a password I'm going to use the password password
with a capital P 1 2 3
password 1 2 3
okay the passwords didn't match I'm going to try that one more time password 1 2
3 and there we go they match that time but
I got a warning saying that the password is too common now this is because I'm
using a very basic password because I'm only going to be accessing it locally on my
machine so there's not much security risk here as there's no sensitive data
in the database however if you are doing this on a public server or a server that
accessible to the Internet I strongly recommend you use a strong password to
protect your data I'm just going to click YES here to allow us to use a weak
password and then you can see that the super user account has been created
successfully and that's how you create a super user using the Django CLI