My Brain Cells

Easiest (and best) learning materials for anyone with a curiosity for machine learning and artificial intelligence, Deep learning, Programming, and other fun life hacks.

Setup Django Project


1. Install Python on your PC

2. Create project folder as “Projects”

3. Create a virtual environment 

                $ pyvenv <env-folder>

                # Or, if pyvenv is not available

                $ python3 -m venv <env-folder>

If that’s not working, then first install it as a separate module from pip:

                $ pip install virtualenvwrapper

And then create the environment using the virtualenv command instead:

                $ mkvirtualenv <env-folder>

‘Activate’ the virtual environment.

            $ <env-folder>Scriptsactivate.bat

To leave the virtual environment use deactivate :

            $ (<env-folder>) $ deactivate

4. In the terminal, Go to the Projects directory, Here Install Django

                               $ pip install Django 

5. Create a new project

                                $ django-admin startproject mydjango 

That will create a folder named mydjango which will contain the following files:


├── mydjango/

│   ├──

│   ├──

│   ├──

│   ├── 

│   └──


*note: if is not present in your folder, create one.

6. Start the server 

                                $ cd mydjango

                               $ python runserver

Adding a Django App:

                        $ python startapp myapp

This will generate the myapp folder and some necessary files for you, like and .

In order to make Django aware of myapp, add it to your :

# mydjango/






Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top