Set Up Your Development Environment: Recap
In this section, you:
Created a virtual environment in the CLI:
$ python3 venv .env
Activated the virtual environment:
$ source .env/bin/activate
Installed Django inside the virtual environment:
(.env)$ pip install django
Created a Django project management app inside the existing folder without duplicating the folder structure:
(.env)$ django-admin startproject portfolio .
Visited the site at
In the next section, you’ll start building a Django application inside the project that you just created.
00:00 Hey, and welcome to the final video in this Part 2 section, where we’re setting up our development environment. This is just going to be a quick recap and an outlook on what we’re going to do afterwards.
So, what you did in this section is: you created a virtual environment using the command line, and we use the command
python3 make virtual environment—using this module—and then calling it
.env. Remember, you can name this whatever you want to. Next, we activated the virtual environment using the
source command, and then you have to give the path to the
activate script, which is
[your environment name]/bin/activate.
In this case, we made sure to not duplicate the folder structure, because we had created our folder outside. So we used this little
. (dot) here, at the end. We said
django-admin startproject which is the command you use, then gave it a name. In our case, that was
And then we use this little
. to just avoid this extra folder structure. And with this, we created our Django project, and the management app, and
manage.py file, which is something that we’re going to use a lot throughout working with Django.
And finally, we started the development server by typing
runserver, and then we visited the site, at
8000, and we saw something that looks similar to this. Great! In the upcoming section, Part 3, we’re going to start building a Django application.
01:49 So, that means inside of our Django project that we just created now, we’re going to make a separate app. And you remember from Part 1, the structure of a Django project includes often multiple apps, and we’re going to start off by building our first app in Part 3.
Become a Member to join the conversation.