Establish a django project

After Django Installed

1. Activate the virtual environment

1
$ source activate myDjangoEnv

2. Init the project

1
$ django-admin startproject first_project

Default Files

Screen Shot 2017-01-28 at 12.48.16 AM.png

  • __init__.py

    This is a blank Python script that due to its special name let’s Python know that this directory can be treated as a package

  • settings.py

    This is where you will store all your project settings

  • urls.py

    This is a Python script that will store all the URL patterns for your project. Basically the different pages of your web application.

  • wsgi.py

    This is a Python script that acts as the Web Server Gateway Interface. It will later on help us deploy our web app to production

  • manage.py

    This is a Python script that we will use a lot. It will be associates with many commands as we build our web app!

3. Run server to test

1
$ python manage.py runserver

Use the given url, you can see it.

3. Start Application

1
$ python manage.py startapp first_app