#100DaysOfWeb in Python Transcripts
Chapter: Days 45-48: Build a simple Django app
Lecture: Get Django up and running

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Time to install Django. First, let's make a virtual environment.
0:20 Activate it and install Django. Let's start a project and here on the slide you see the syntax for that.
0:33 After installing Django I have a Django admin utility. And Django you always start with a project which is kind of the global project
0:43 with it's configuration and all the generic stuff. And inside that project you can make one or more apps. And in this case we're just going to do
0:52 one app called quotes. So first make a project. And I'm using the . because I want to create the main app of the project called mysite
1:08 in this current directory. And I've grown accustomed to this because not doing it like this gave me issues
1:14 when I deployed previous Django apps to Heroku. This gave me the manage.py which we will use later to do the database migrations and run the server.
1:30 My venv is my virtual environment and mysite is the main app or the project app which has it's settings for the configuration
1:39 which we will see in the next video. And I want to have my quotes as a separate app. So I do start app quotes. And now I have also quotes folder
1:54 which is the app inside the Django project. Django comes with batteries included so the authentication model is already there.
2:02 And I can now run the migrate command on the manage.py to get all those models synced to the database. And where's the database?
2:12 Well, out of the box Django comes with SQLite. Usually I use Postgres for my projects but getting Postgres ready is beyond the scope of this video.
2:22 So for now to focus on Django we're going to use the standard file base SQLite database, which you see here.
2:28 And now I can run the same manage.py command again with run server. And that starts the Django server on localhost
2:39 and I can now navigate to this address and it should see a landing page confirming that Django is installed successfully. Awesome.
2:51 In the next video we're going to look at settings of py to look at some common configuration settings you want to add to a starting Django project.


Talk Python's Mastodon Michael Kennedy's Mastodon