Django Introduction and Installation
What is Django?
Django is python based web framework which allow you to quickly create web application without all of the installation or dependency problems that you normally will find with other framework.
When you’re building a website, you always need a similar set of components: a way to handle user authentication (signing up, signing in, signing out), a management panel for your website, forms, a way to upload files, etc. Django give you ready-made components to use.
Why Django?
- It’s very easy to switch database in Django framework.
- It has built in admin interface which makes easy to work with it.
- Django is fully functional framework that requires nothing else.
- It has thousands of additional packages available.
- It is very scalable.
Some features of Django
Versatility of Django
Django can build almost any type of website. It can also work with any client side framework, and can deliver content in any format such as HTML, JSON, XML etc. Some sites which can be build using Django are wikis, social networks , new sites etc.
Security
Since Django framework is made for making web development easy, it has been engineered in such a way that it automatically do the right things to protect the website. For example, In Django framework instead of putting password in cookies the hashed password is stored in it so that it can’t be fetched easily by hackers.
Scalability
Django web nodes have no stored state, they scale horizontally – just fire up more of then when you need them. Being able to do this is the essence of good scalability. Instagram and Disqus are two Django based products that has millions of active users, this is taken as a example of scalability of Django.
Portability
All the codes of Django framework is written in Python, which runs on many platforms. Which leads to run Django too in many platforms such as Linux, Windows and Mac OS.
Installation of Django
- Install python3 if not installed in your system ( according to configuration of your system and OS) from here . Try to download the latest version of python it’s python3.6.4 this time.
- Install pip- Open command prompt and enter following command-
Note- Installation of Django in Linux and Mac is similar, here i am showing it in windows for linux and mac just open terminal in place of command prompt and go through the following commands.
python -m pip install -U pip

pip install virtualenv

- Create a virtual environment by giving this command in cmd-
virtualenv env_site
- Change directory to env_site by this command-
cd env_site
- Go to Script directory inside env_site and activate virtual environment-
cd Script
activate



pip install django

cd ..

django-admin startproject geeks_site

cd geeks_site

python manage.py runserver


Reference
developer.mozilla.org
Recommended Posts:
- Introduction and Installation of Git
- Introduction and Installation of Heroku CLI on Windows machine
- Beginning BootStrap (Part-1) | Introduction and Installation
- Django Introduction | Set 2 (Creating a Project)
- LAMP installation and important PHP configurations on Ubuntu
- Django Models | Set - 2
- Django Models | Set - 1
- Django - Creating apps | Set - 2
- Django URL patterns | Python
- Django Migrations | Python
- Views In Django | Python
- Python | Django News App
- Django - Dealing with warnings
- Django - Creating Apps | Set - 1
- Python | Uploading images in Django
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



