WEBVTT
Kind: captions
Language: en

00:00:00.030 --> 00:00:04.830
In this section of the course we're
going to be enabling the Django admin on

00:00:04.830 --> 00:00:10.050
our project the Django admin is a really
useful tool that allows you to create an

00:00:10.050 --> 00:00:13.740
administrative website for your project
that lets you manage your database

00:00:13.740 --> 00:00:19.710
models this makes it really easy to
inspect the database see models and

00:00:19.710 --> 00:00:21.640
modify them

00:00:21.640 --> 00:00:25.740
Before we can use the Django
admin we need to create a super user a

00:00:25.740 --> 00:00:30.860
super user is a user with the maximum
privileges over our database

00:00:30.860 --> 00:00:31.380
We're going

00:00:31.380 --> 00:00:36.500
to be creating a super user in this
video using the Django command line tool

00:00:36.500 --> 00:00:41.760
start by opening up the terminal window
and navigating to our project the

00:00:41.760 --> 00:00:48.480
profiles REST API then type vagrant SSH
or if vagrant isn't already started run

00:00:48.480 --> 00:00:54.120
vagrant up and then vagrant SSH to
connect to the development server once

00:00:54.120 --> 00:00:58.620
you're on the server type cd forward
slash vagrant to switch to the vagrant

00:00:58.620 --> 00:01:05.880
directory and then type source tilde
forward slash env slash bin slash activate

00:01:05.880 --> 00:01:09.980
to activate our Python virtual
environment

00:01:09.980 --> 00:01:11.120
Once you're on the virtual

00:01:11.130 --> 00:01:15.810
environment we can then use the Django
manage command to create a super user

00:01:15.810 --> 00:01:24.960
simply type Python manage dot py  create
super user all one word and hit enter it

00:01:24.960 --> 00:01:29.220
will prompt you to enter an email
address and I recommend you use your own

00:01:29.220 --> 00:01:35.790
email address I'm going to use mark@londonappdev.com and then a name I'm

00:01:35.790 --> 00:01:40.400
just going to put mark and then a password
I'm going to use the password password

00:01:40.400 --> 00:01:44.120
with a capital P 1 2 3

00:01:44.120 --> 00:01:47.320
password
1 2 3

00:01:47.329 --> 00:01:52.619
okay the passwords didn't match I'm going to
try that one more time password 1 2

00:01:52.619 --> 00:01:54.810
3  and there we go they match that time but

00:01:54.810 --> 00:01:59.880
I got a warning saying that the password
is too common now this is because I'm

00:01:59.880 --> 00:02:04.439
using a very basic password because I'm
only going to be accessing it locally on my

00:02:04.439 --> 00:02:08.369
machine so there's not much security
risk here as there's no sensitive data

00:02:08.369 --> 00:02:13.860
in the database however if you are doing
this on a public server or a server that

00:02:13.860 --> 00:02:18.270
accessible to the Internet I strongly
recommend you use a strong password to

00:02:18.270 --> 00:02:23.340
protect your data I'm just going to
click YES here to allow us to use a weak

00:02:23.340 --> 00:02:27.330
password and then you can see that the
super user account has been created

00:02:27.330 --> 00:02:34.370
successfully and that's how you create a
super user using the Django CLI

