Course Code: B120409T
Course Name: Web Development with Python `
LEARNING OBJECTIVES:
The students will be able to develop expertise related to the following:
1. Understand the model view controller (MVC) and Model
View template (MVT) pattern and how it is implemented
in Django
2. Create Django templates for easy-to-modify views
3. Map views to URLs
4. Take advantage of the built-in Admin interface
5. Provide HTML form processing
6. Integrate automated tests with your code
PRE-REQUISITES:
1. All students should have a working knowledge of HTML 5, and CSS.
2. All students should have a working knowledge of Python
COURSE OUTCOMES (COs):
After completion of this course, the learners will be able to:-
CO# Detailed Statement of the CO *BT Mapping to PO #
Level
CO1 Install and Configure Python and Django in a development and BTL1, PO4,PO5, PO6, PO8
production environment BTL2,
BTL3
CO2 Understands the security implications of Django using templates BTL2, PO4, PO5, PO8
and develop secure websites with Django BTL3,
BTL4,
BTL6
CO3 Utilize Django Models to build an interface with powerful BTL3, PO5,PO7,PO8
relational databases BTL6
CO4 Design and develop forms (both ad-hoc and from Models and BTL3, PO6,PO8
Data Models) and automate the validation and verification of BTL4,
data in those forms BTL5,
BTL6
UNIT – I
No. of Hours: 11 Chapter/Book Reference: TB1 [Chapters - 1, 2, 3]
Web development basics: Client server architecture, webserver, web
browser, basic of HTML concept, basics of CSS, basics of
JavaScript, Bootstrap.
Introduction to Django: Web Framework, The MVC and MTV Design Pattern,
Difference between MVC and MTV design patterns, Django’s History, Installation of
Python, Installation of Django using PIP command, Understanding Django
environment, Django Commands Overview
UNIT – II
No. of Hours: 11 Chapter/Book Reference: TB1 [Chapter - 4]
The Basics of Dynamic Web Pages: (Views and URLconfs):
Creating View, Dynamic Content, Mapping URLs to Views,
processing a Request, URL configurations and Loose Coupling,
Creating View with Dynamic URLs, Django’s Error Pages
The Django Template System:
Template System Basics, template language: variables, Boolean Operators, for loop,
if, Basic Template Tags and Filters, Comments, Using Templates in Views, Template
Loading, Template Inheritance Tags, Creating a Model Manipulating Data (CRUD)
Linking Models
Django Forms: Creating a form using Django Forms, Render HTML
Forms (GET & POST), Form Fields, form field custom widgets,
Simple Validation
UNIT – III
No. of Hours: 11 Chapter/Book Reference: TB1 [Chapter - 5, 7]
Interacting with a Database: Models: Using Database Queries in
Views (hard-coding the connection parameters), Configuring the
Database, Creating First App , Defining Models in Python,
Creating ,Installing the Model, Basic Data Access, Adding Model
String Representations, Inserting and Updating Data, Selecting Objects,
Filtering Data, Retrieving Single Objects, Ordering Data, Chaining
Lookups, Slicing Data, Deleting Objects , Making Changes to a
Database Schema , Basic model data types and fields list ,
Relationship Fields
,Field options, Adding Fields , Validation on Fields in a Model , using
Django Field Choices, Removing Fields, Removing Many to Many
Fields, Removing Models, creating forms using Models
UNIT – IV
No. of Hours: 11 Chapter/Book Reference: TB1 [Chapters - 6, 12, 14];
The Django Administration Site: Creating superuser for accessing the
backend admin app, registering custom Django models with the admin
site, customizing admin rendering of Django models, Customizing
Django admin templates look and feel.
Deploying Django Project: Real time project: E-commerce
domain applications Front-End Back- End HTML, CSS,
BOOTSTRAP, DJANGO SQLite
Preparing Your Codebase for Production, implementing error Templates, Setting up
Error Alerts
Sessions, Users, and Registration: Getting and Setting cookies,
Setting Test Cookies Django’s Session Framework: enabling sessions,
using session in views, Using Sessions Outside of Views, destroying a
session using flush.
Security in Django: Cross site request forgery protection, Cryptographic Signing
TEXT BOOKS:
TB1. The Django Book freely available -
[Link]
[Link] 3 By Example, 3rd Edition,By Antonio Mele
REFERENCE BOOKS:
[Link]://[Link]/
RB2. Python Web Development with Django by Jeff Forcier , Paul Bissex ,
Wesley Chun
RB3. Django for Beginners: Build websites with Python and Django by William
S. Vincent