Web Development using Python
Get the full GTU study material, English & Gujarati textbook PDFs, syllabus curriculum, and solved previous year question papers.
English Book & Chapters
English Book Coming Soon
We are working hard to add this material. Stay tuned for updates!
Follow on Instagram for UpdatesGTU Previous Year Papers
Papers Coming Soon
We are working hard to add this material. Stay tuned for updates!
Follow on Instagram for UpdatesWeb Development using Python Syllabus — Unit-wise Content
The official GTU curriculum for Web Development using Python (subject code DI05000091) as prescribed for Auto · Semester 5 divides the course into 5 units, covering 52 listed topics. The unit-wise breakdown below is read from the GTU syllabus document for this subject code, so you can check what the course actually covers before deciding which papers to attempt.
Download the official syllabus PDF (DI05000091)Unit 1 Python Object-Oriented Programming (OOP)
- ● Introduction to OOP ● Classes
- Attributes and Methods ● Constructors (__init__)
- destructors (__del__) and self parameter ● Encapsulation and Data hiding: o Public
- protected (_), and private (__) attributes/methods o Accessing data using methods ● Inheritance: o Single inheritance o Multilevel inheritance o Use of super() ● Polymorphism o Method overriding o Operator overloading ● Abstraction o Abstract classes o Use of abc module ● Magic methods (Dunder Methods): __str__
- __eq__ etc
Unit 2 Python Database Programming
- ● Introduction to SQLite and PostgreSQL ● Python Database Connectivity using SQLite (sqlite3 module) o Connecting to database o Executing SQL queries Program Name: Diploma Engineering Level: Diploma Branch: Computer Engineering / Computer Science and Engineering Subject Code: DI05000091 Subject Name: Web Development using Python ● SQL Commands using sqlite3 o DDL: CREATE TABLE
- ALTER TABLE
- DROP TABLE o DML: INSERT
- SELECT (with WHERE and ORDER BY)
- DELETE o Aggregate functions: COUNT, SUM, AVG, MIN, MAX o GROUP BY and HAVING clause ● Parameterized Queries to prevent SQL injection (using ? placeholders) ● Introduction to ORM (Object Relational Mapping) o Need for ORM in modern web applications o ORM concept o Brief introduction to ORM tools used in Python web frameworks (SQLAlchemy
- Django ORM)
Unit 3 Flask Framework
- ● Introduction to Flask o Introduction to web frameworks o Micro (Flask) vs
- Full-stack (Django) Frameworks o Flask framework features and advantages o Flask application Structure ● Routing
- Views and URL Handling o Routing concept in Flask o Defining routes with @app.route() decorator o URL Variable rules
- converters o HTTP methods: specifying methods=['GET'
- 'POST'] o Using url_for() for dynamic link generation ● Dynamic UI with Jinja2 Templating Engine o Jinja2 template syntax o Rendering templates using render template() o Variables: {{variable}}
- Filters {{name|title}} o Control structures: {% if %}
- {% for %} o Template inheritance: {% extends 'base.html' %}
- {% block content %} o Linking CSS, JavaScript using the static folder/CDN ● Forms Handling with WTForms o Form classes: class LoginForm(FlaskForm): with fields/validators o Template integration: {{form. hidden tag ()}}
- {{form. field
- Label}} o Processing: form.validate_on_submit()
- accessing form.data Program Name: Diploma Engineering Level: Diploma Branch: Computer Engineering / Computer Science and Engineering Subject Code: DI05000091 Subject Name: Web Development using Python ● Flask with Database o Connecting Flask with SQLite database o Creating database and performing CRUD operations o Displaying database data on web pages ● Sessions
- Cookies, and Flash Messages o Sessions: session['key'] = value
- session.pop('key') o Cookies: response.set_cookie ('key'
- 'value') o Flash messages: flash()
- display with get_flashed_messages()
Unit 4 Django Framework
- ● Django Introduction and Project Structure o Overview and features of Django o Django project/app structure o MVT architecture: Model (data)
- View (logic)
- Template (presentation) ● Views and URL Mapping o URL configuration: path()
- include() o Function-based views (FBV): render()
- redirect() o Class-based views (CBV): ListView
- CreateView o Context processors
- HTTP methods handling ● Models and Django ORM o Defining models: classes inheriting from models.Model o Migrations: makemigrations
- understanding migration files o Django ORM basics o CURD operations using Django ORM ● Django Admin Interface: o Enabling admin: create superuser
- register models in admin.py o Customizing admin ● Templates and Template Inheritance o Django template language: Template variables
- template tags
- common template filters o Bootstrap integration ● Forms and ModelForms o Built-in forms: Form class vs
- ModelForm o Creating ModelForms o Form rendering: {{ form.as_p }}
- manual field rendering o File uploads: FileField
- MEDIA_URL/ROOT config o Validation and error display in templates Program Name: Diploma Engineering Level: Diploma Branch: Computer Engineering / Computer Science and Engineering Subject Code: DI05000091 Subject Name: Web Development using Python
Unit 5 Advance Django
- REST APIs
- Security and Deployment ● Authentication and Security o Django’s built-in auth system (User model
- permissions) o Registration
- login, and logout views o protecting views with decorators/mixins (@login_required
- LoginRequiredMixin), and permission checks with PermissionRequiredMixin o Web Security Best Practices for protection against common vulnerabilities: Cross-Site Request Forgery (CSRF): middleware + tokens
- Cross-Site Scripting (XSS): auto-escaping
- SQL injection (ORM usage)
- HTTPS enforcement ● Django Middleware & Sessions ● Django REST Framework (DRF) o Introduction to DRF o Serializers: ModelSerializer for Post/Category
- validation (validate()
- create()) o Function-based views using @api_view
- Class-based views using APIView and Generic Views o Routers: DefaultRouter()
- URL auto-generation (/api/posts/) ● Deployment o Environment variables: using python-dotenv or django-environ for secrets o Deploy a simple Django app locally and on cloud platforms like PythonAnywhere