From the course: Django: Forms

Starting a new project

From the course: Django: Forms

Start my 1-month free trial

Starting a new project

- [Instructor] Let's go ahead and fire off our project for creating Nandia's Gardens website. So first, find a place that you want to save your project. I'm going to be doing this on my desktop so I'm just going to cd onto my desktop. Once there, you need to make sure that you have version Virtual Environment installed on your computer. If you don't, go ahead and do pip3 install virtualenv. So go ahead and make sure that's good to go. With that in place, we need to create a Virtual Environment for our projects. So, I'm going to say virtualenv and I'm going to call my venv, short for Virtual Environment. Go ahead and let that set up. With that done let's go ahead and activate that Virtual Environment. We'll say source venv/bin/activate. There you can see on our left, in parentheses, that we're inside of this Virtual Environment now. So, with that in place, we need to make sure that we have Django installed. Let's do a pip install of Django. And once that's finished, let's go ahead and start our project. So, to do that, go ahead and use the Django admin, django-admin startproject. We're going to call this nandiasgarden. Go ahead and hit enter. If you do an ls now, you can see that we have this new directory called nandiasgarden. I like to rename the top level file inside of a Django project to call it whatever the name the project is, dash project, so that we know that it's the top level folder. We're going to use a little terminal trick here, we're going to say move, mv, and we're going to say nandiasgarden and space, change this to nandiasgarden-project. Now that we've done that, if we do an ls you can see that the name of the directory has changed. With that in place let's go ahead and move into that directory. We'll cd to nandiasgarden-project. Then once we're in there, let's just go ahead and test that our Django project is working. Let's do python manage.py runserver. And let's go ahead and move over to our browser, make sure we have the initial starting page. So, localhost:8000 and look at that we have a project up and running.

Contents