WEBVTT
Kind: captions
Language: en

00:00:00.079 --> 00:00:07.639
Next we're going to create a new Django
project and app for our profiles API

00:00:07.639 --> 00:00:14.490
we're going to do this using the Django
admin command line tool so make sure

00:00:14.490 --> 00:00:18.359
that you have a terminal or git bash
window open and that you're connected to

00:00:18.359 --> 00:00:23.519
our vagrant server you're in the forward
slash vagrant directory and you are

00:00:23.520 --> 00:00:29.200
working on the virtual
environment we created previously

00:00:29.200 --> 00:00:36.660
Ok now we can use the Django admin command
by typing Django - admin dot py start

00:00:36.660 --> 00:00:45.629
project profiles project dot what this
does is it calls the Django admin dot py

00:00:45.629 --> 00:00:50.730
script it passes in and the arguments
start project to say that we want to

00:00:50.730 --> 00:00:55.199
start a new project and it specifies the
name of the project so our project is

00:00:55.199 --> 00:00:59.460
going to be called the profiles
underscore project and then the location

00:00:59.460 --> 00:01:05.129
that we want to create the project so
this last dot here this is optional now

00:01:05.129 --> 00:01:09.869
if you don't specify this then it will
create a new subfolder called Profiles

00:01:09.869 --> 00:01:13.290
project but we don't want to do that we
actually want to create it in the root

00:01:13.290 --> 00:01:19.130
of our project so that's why I put dot
to say do it right here in the root

00:01:19.130 --> 00:01:22.000
location of our project

00:01:22.000 --> 00:01:25.430
ok so if you hit
enter then it will go ahead and

00:01:25.430 --> 00:01:32.400
automatically create the Django manage dot
py script and then the profiles project

00:01:32.400 --> 00:01:39.040
directory here with the settings URLs
and the wsgi.py file

00:01:39.040 --> 00:01:40.170
ok now we have

00:01:40.170 --> 00:01:45.450
the Django project we need to create an
app within our project for our provides

00:01:45.450 --> 00:01:52.110
API so a Django project can consist of
one or more sub applications within the

00:01:52.110 --> 00:01:56.399
project that you can use to separate
different functionality within your

00:01:56.399 --> 00:02:01.829
project so we're just going to create
one API the profiles REST API so we'll

00:02:01.829 --> 00:02:08.780
just create one app and we'll call the
app profiles underscore API so python

00:02:08.780 --> 00:02:13.290
manage dot py now that we've created our
project we need to use the

00:02:13.290 --> 00:02:20.549
manage dot py scripts instead of Django admin and
then we'll type start app profiles

00:02:20.549 --> 00:02:23.440
underscore API

00:02:23.440 --> 00:02:27.930
hit enter so this will
create a new subfolder called profiles

00:02:27.930 --> 00:02:33.870
API which has the admin dot py apps dot py models tests and views and the

00:02:33.870 --> 00:02:41.090
migrations folder so this creates a new
Django app within our project

