top of page

Introduction to Django, Python Web Framework

Updated: Oct 15, 2021


Django web framework

Django python web framework


Introduction


Django is a high-level, free and open source python web framework which helps us to build a rapid development of secure and maintainable web applications. django is Built by experienced developers, it takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel.


Django was developed in 2003 by python programmer Adrian Holovaty and Simon Willison when they were working at the Lawrence Journal-World newspaper and initially released on 21, july 2005. Its current stable version is 3.2.7 which was released on 1 september, 2021.


Why Dajango ?


Some Features of Django :


Secure : This framework helps developers to avoid many common security mistakes such as SQL injection, cross-site scripting, cross-site request forgery. clickjacking etc. Django provides the tools and doc to prevent common mistakes causing security problems (csrf, xss, etc.). It provides a secure way to manage user accounts and passwords.


Versatile : Django allows us to build various types of web applications such as content management systems, social networks sites or scientific computing platforms etc.


Scalable : Django has the ability to flexible and quickly scale the website to meet the heaviest traffic demands.


Fast : Django helps developers to make it easier to build better web apps quickly and with less code.


Fully loaded : Django includes a lot of libraries that can be used to handle common web development tasks, like content management, user authentication, RSS feeds, and many more.


Getting started with Django


Before you can use Django you need to install Django in the system. To install django, run this command 'pip install django' or ‘python -m pip install Django’ in the anaconda command prompt. After the installation is successful we can build the django web application.


Here we created Simple web application project print ‘Hello World!’


Steps 1

First set the path to the folder that will contain all the files in your project. After that, for creating the django project, run the following command on anaconda command prompt. ‘django-admin startproject mysite’ Note : mysite is the project name. This will create a new directory. If cd into this new directory you’ll see another directory called mysite and a file called manage.py.


Step 2

Once the django project is created, first change the directory to mysite. Then start the server by using the given command to check the set up was successful. ‘python manage.py runserver’.


After that, copy the link and run it on the browser and you should see the following.



Step 3

In this step create a django application using this command ‘python manage.py startapp hello_world’. This command will create a folder ‘hello_world’ and five python files in that folder.



Step 4

Create a view. Views in Django are a collection of functions or classes inside the views.py file in your app directory. In this we have defined a view function called hello_world(). This data will display on the web browser.



Step 5

The final step is to hook up URLs so that we can visit the page we have just created. We need to include a URL configuration for the hello_world app. Inside mysite/urls.py, add the following:




Step 6

Inside hello_world/urls.py, we need to import the path object as well as our app’s views module. Then create a list of URL patterns that correspond to the various view functions.


Now, when you start the server and visit localhost:8000/hello_word, you should be able to see the message.



Django is widely accepted and used by various popular sites. Here are the top real world Django Applications.

  • Instagram :

  • Pinterest

  • Mozilla

  • Disqus

  • Bitbucket

  • Openstack

Django Project Ideas

  • Weather App

  • Railway Enquiry System

  • Quiz App

  • Web Crawler

  • Online School System

  • Video Subscription App

  • Calorie Counter

  • chat application

  • Diary App

  • Library Management System


How Codersarts can Help you in Django ?


Codersarts provide:

  • Django Assignment help

  • Django Error Resolving Help

  • Mentorship in Django from Experts

  • Dajngo Development Project


If you are looking for any kind of Help in Django Contact us


bottom of page