Django Setup
Django Setup
Framework: Django is web application Framework, To build any application we cant do it from
scratch. So we can combine ready made and do Framework.
Basically we use Html, css, javascript to design the pages But these are from Frontend.
1.Fast
2.Components more
3. Security
4. Scalability
Django Setup
Django is A Web Framework for Python.
Django is a web development framework that assists in building and maintaining quality web
applications. Django helps eliminate repetitive tasks making the development process an
easy and time saving experience. This tutorial gives a complete understanding of Django.
Advantages of Django
Here are few advantages of using Django which can be listed out here −
Object-Relational Mapping (ORM) Support − Django provides a bridge
between the data model and the database engine, and supports a large set
of database systems including MySQL, Oracle, Postgres, etc. Django also
supports NoSQL database through Django-nonrel fork. For now, the only
NoSQL databases supported are MongoDB and google app engine.
Multilingual Support − Django supports multilingual websites through its
built-in internationalization system. So you can develop your website, which
would support multiple languages.
Framework Support − Django has built-in support for Ajax, RSS, Caching
and various other frameworks.
Administration GUI − Django provides a nice ready-to-use user interface for
administrative activities.
Development Environment − Django comes with a lightweight web server to
facilitate end-to-end application development and testing.
As you already know, Django is a Python web framework. And like most modern
framework, Django supports the MVC pattern. First let's see what is the Model-
View-Controller (MVC) pattern, and then we will look at Django’s specificity for
the Model-View-Template (MVT) pattern.
MVC Pattern
When talking about applications that provides UI (web or desktop), we usually talk
about MVC architecture. And as the name suggests, MVC pattern is based on three
components: Model, View, and Controller. Check our MVC tutorial here to know
more.
The developer provides the Model, the view and the template then just maps it to a
URL and Django does the magic to serve it to the user.
Django Setup:
1. Download Python
2.Check Python Version by
C:\Users\sandeep muttineni>python --version
Python 3.7.0
ii) Create environment by= mkvirtualenv test (here test is environment name )
Here you entered into new environment here we want to install Django.
In test1 enviromment
You have 18 unapplied migration(s). Your project may not work properly until you apply the
migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
August 21, 2021 - 09:49:25
Django version 3.2.6, using settings 'sunny1.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.