Web Development Using Django
Web Development Using Django
-G.JYOTHSNA
(318126512137)
INTRODUCTION
• Another point of importance is that Django includes all the functionalities to secure
websites and helps developers avoid web security mistakes.
HISTORY OF DJANGO
• 2005- publicly released under BSD license in 21, July 2005 and
named it Django.
• Administration GUI
• Development Environment
• Less Coding
• Fast Development
FEATURES OF DJANGO
• Rapid Development
• Secure
• Scalable
• Open Source
Example Code:
views.py
# importing HttResponse from library
from django.http import HttpResponse
def home(request):
# request is handled using HttpResponse object
return HttpResponse("Any kind of HTML Here")
urls.py
# importing view from views.py
from .views import home
urlpatterns = [
path('', home),
]
HTML FORMS
• Some of these form interface elements - text input or checkboxes - are built
into HTML itself. Others are much more complex; an interface that pops up a
date picker or allows you to move a slider or manipulate controls will typically
use JavaScript and CSS as well as HTML form <input> elements to achieve
these effects.
• Django handles three distinct parts of the work involved in forms:
preparing and restructuring data to make it ready for rendering
creating HTML forms for the data.
receiving and processing submitted forms and data from the client
SUPERUSER CREATION:
• Django provides us Admin Panel for it’s users. So we need not worry about
creating a separate Admin page or providing authentication feature as Django
provides us that feature.
• Variables
• Tags
• Filters
• Components
1. Engine
2. Template
3. Context
4. Loaders
5. Context Processors
CRUD OPERATIONS
• Retrieve View
• List View
• Detail View
• Update View
• Delete View
Thank YOU