Django Basic-2-Advance
What is framework ?
A framework is a set of conceptual structure and guidelines, used to build something useful.
A framework may include predefined classes and functions that can be used to process input, manage hardware devices, and interact with system software.
The purpose of framework is to allow developers to focus on building a unique features for thier Projects rather than writing code from scratch.
Advantages :-)
Web Framework - A web framework ( WF ) or Web Application framework ( WAF ) which helps to build web applications.
It provides tools and libraries to simplify common web development operations. This can incude web services, APIs, and other resources.
Web frameworks help with a variety of tasks, from templating and database access to session management and code resuse.
Some Web Framework
Model View Template ( MVT ) - The MVT is an design pattern that separates an application into three main logical components Model, View and Template.
Each of these component has thier own role in a project.
Model - The Model responsible to handle database. It is a data access layer which handles the data.
View - The user can send request by interacting with template , the view handles these requests and sends to Model then get appropriate response from Model, sends response to template. It may also have requires logics. It works as a mediator between Template and Model.
Template - It represents how data should be presented to the application user. User can read or write the data from template.
Basically , It is responsible for showing end user content, we can say it is user interface. It may consists of HTML/CSS/JS mixed with Django Template Language.
Why Use MVT ?
Django
Django is a free , open-source , Python based High-Level Web Framework.
It follows the Model View Template ( MVT ) architecture pattern.
It was originally createdby Adrian Holovaty and Simon Willision.
It was created on 2003 at Lawrence Journal World Newspapaer.
It was released publicly under a BSD license in July 2005.
In june 2008, it was announce that DJango Software Foundation ( DSF ) would maintain Django in the future.
What we can build with Django ?
Advantages :-)
Recommended by LinkedIn
Django Project Directory Structure
wsgi.py : WSGI ( Web Server Gateway Interface ) is a specification that describes how a web server communicates with web application, and how web applications can be chained together to process one request. WSGI provides standard for synchronous Python apps.
asgi.py : ASGI ( Asynchronous Gateway Interface ) is a spritual successor to WSGI, intended to provide a standard interface async-capable Python web servers, frameworks, and applications. ASGI provides standard for both asynchronous and synchronous apps.
settings.py : The file contains all the information or data about project settings. Eg. Database config information, template , installed app, validators, middleware etc.
Some Basic Django Commands
Install Django
pip install django
Create Project
django-admin startproject PROJECT_NAME
Create App
python manage.py startapp APP_NAME
Run Project
python manage.py runserver
Create Database
python manage.py makemigrations
python manage.py migrate
Create Superuser
python manage.py createsuperuser
Dis Advantages
Conclussion
Django is a high-level Python web development framework that enables rapid development and clean, pragmatic design. The system follows the Model View Controller architectural pattern and earns recognition for its stability, flexibility, and well-documented codebase. If you’re looking for an experienced team to help you build your next project on this powerful framework. We have years of experience working with Django and other leading technologies, so we can help you create a product that exceeds your expectations.