Hey, welcome back.
In this video, we will set up our Django app.
So we created a QR code previously.
Let's close those files and go to the terminal.
So just here, you want to install Django first.
Pip install Django.
So that's the first step.
You install Django.
Then you create a project.
Then you create an app for that project.
Then connect the app to the project and then run the app to see the results on the website on the browser.
So the second step was to create a Django project.
To do that you do Django admin start project my site space dot.
I've explained this command previously, but again, what that will do is it will create a mysite directory
in the current directory.
The current directory is app 18 restaurant menu.
So now here you'll see if you do a reload from disk, my site will show up.
So that folder with all the Django files.
So these are default project files.
Now this project doesn't have any apps yet.
We can add one or more apps to this Django project using Python manage.py.
So Manage.py is one of the generated files.
It's located in the root directory here.
Manage.py Space start app.
This is the command and then give a name to your app.
Let's call it restaurant underscore menu.
Don't have spaces in the app name press enter and that should create a new directory restaurant menu.
So both my site and restaurant menu are two directories in the root directory.
So we have an app, but we need to connect that app to the My site project by going to my site settings.py
and then scroll down to find the installed apps.
These here are some default apps and then after the last comma you want to press enter to create a new
line and then create a new empty string.
And inside the string you want to copy paste the name of your app.
So restaurant menu copy it and paste it inside here.
Make sure not to have spaces in the string inside the quotes, and then leave a comma here so that if
we add more apps to our Django project, then we can do that in here, right?
So that's a list of strings.
Each strings points to the name of an app, save the file with Ctrl or Command S, and then let's run
the project.
So to do that, to run a project, you do Python Manage.py followed by the Run server command press
Enter.
And so that should display this URL.
You can click that.
And that should show you the default website.
So we see this default website because we haven't mapped any URLs.
So we have instructed Django yet what to do when the home page is visited.
So that's something we'll do in the next videos.
So let's keep going.