How to create a django project

Django is one of the leading web framework for building highly scalable web applications using python language. Once you install Django form the Django Project website its easy to build an application using the command line.

Create a project

Go to your command prompt / terminal and  start hit following command.

$ python-admin startproject myproject1

This should create a project directory to start with. django creates all basic folder structures and elementary templates of configuration files so that you can start with the project.

Folder structure

Below is the folder structure you would expect to be created:

myproject1/
    manage.py
    myproject1/
        __init__.py
        settings.py
        urls.py
        wsgi.py

The outer myproject1 folder can be replaced with your wishful naming you want to do in future. The internal folder manage.py contains the configuration scripts for the project. The internal myproject1 folder is where the real project files are located. __init__.py is to be kept to understand that this is a django project with myproject1 name. settings.py contain configuration setting for this project. urls.py contains mapping for url paths in http to respecting python file to execute for that path. wsgi.py is used to port the project to different web servers.