Let me start by defining: What is a "Web Application Framework" ?
A web application framework (WAF) is a software framework that is designed to support the development of dynamic websites, web applications, web services and web resources. Framework aims to alleviate the overhead associated with common activities performed in web development.
Django is a free and open source web application framework, written in Python. When building a website, you always need a similar set of components for example: a way to handle user authentication (signing up, signing in, signing out), a management panel for your website, forms, a way to upload/download files etc. Fortunately for you other people long ago noticed that web developers face similar problems when building a new site, so they teamed up and created frameworks. Django gives you ready-made components you can use. Frameworks exist to save you from having to reinvent the wheel and help alleviate some of the overhead when you’re building a new site.
Django Installation
Before installing Django, we need to set up our development environment. You may skip this step but its highly recommended not to. So lets create virtual environment (also called virtualenv). It will sandbox (or isolate) your Python/Django setup on a project wise basis, i.e that any changes you make to one website won't affect any others that you are also developing. The installation procedure described below is for Linux /OS X.
In case of error on Linux (Ubuntu or derivatives) try:
A myenv (or choose any name you like) directory will be create. To start or activate it, run:
mkdir django_project cd django_project python3 -m venv myenv
In case of error on Linux (Ubuntu or derivatives) try:
sudo apt-get install python-virtualenv virtualenv --python=python3.4 myenv
A myenv (or choose any name you like) directory will be create. To start or activate it, run:
source myenv/bin/activate
Note 'source' might not be available sometimes. So try this instead:
. myenv/bin/activate
Now virtual environment is all set up. Time to install Django.
pip install django==1.8
You can specify particular version of Django to installed (here 1.8).
Create Django Project
Now to create django project, run:
The django-admin.py script will create directories for you. The tree structure of directories should look like this:
django_project
|--manage.py
|--mysite
settings.py
urls.py
wsgi.py
__init__.py
Create Django Project
Now to create django project, run:
django-admin startproject mysite .
The django-admin.py script will create directories for you. The tree structure of directories should look like this:
django_project
|--manage.py
|--mysite
settings.py
urls.py
wsgi.py
__init__.py