Python Web Workshop
Python Web Workshop
● Objective: Understand how to control the flow of code using conditions and loops.
● Topics:
○ Conditional statements (if-else)
○ Loops (for, while)
○ Functions and function arguments/return values
○ Exception handling (try-except)
● Hands-on: Write a program that calculates the factorial of a number using both
recursion and iteration.
● Doubt-solving session: Debug and clarify logic errors in loops and conditionals.
● Objective: Get comfortable with the development environment and version control.
● Topics:
○ Setting up VS Code (extensions for Python, Django)
○ Installing Git and basic Git commands (clone, commit, push, pull)
○ Using GitHub for code hosting
● Hands-on: Initialize a local Git repository, commit changes, and push to GitHub.
● Doubt-solving session: Resolve issues with Git setup and pushing to GitHub.
Hour 10: Building a RESTful API with DRF (Serializers, Views, URL Routing)
● Objective: Build a basic REST API using DRF for a sample model.
● Topics:
○ Serializers in DRF and how they convert complex data types (e.g., models) into
JSON
○ Creating API views (function-based and class-based)
○ Setting up URL routing for API endpoints
● Hands-on: Application development as of technical specification
● Doubt-solving session: Address issues with serializers and API views, discuss
common pitfalls.
Hour 11: Advanced DRF Features: Authentication & Permissions
● Objective: Learn how to paginate and filter API data for more efficient data handling.
● Topics:
○ DRF pagination and how to paginate large data sets
○ Adding filtering capabilities to API endpoints (query parameters)
○ Using django-filter for advanced filtering
● Hands-on: Implement pagination and filtering in application
● Doubt-solving session: Help resolve issues with paginated responses and filtering
logic.
● Objective: Learn how to write unit tests for DRF APIs to ensure stability and
correctness.
● Topics:
○ Introduction to testing in Django using unittest and DRF’s APIClient
○ Writing tests for DRF views and serializers
○ Running tests and interpreting results
● Hands-on: Writing test cases as per requirement.
● Doubt-solving session: Discuss common mistakes in writing and running tests.
● Objective: Learn how to use Django’s built-in admin interface to manage your database.
● Topics:
○ Setting up and customizing Django admin
○ Registering models with admin site
○ Customizing list views and form layouts
● Hands-on: Django Admin Dashboard
● Doubt-solving session: Clarify issues with admin customization and model registration.
● Objective: Learn how to deploy a Django app locally on your machine and troubleshoot
common deployment issues.
● Topics:
○ Local deployment steps (collect static files, configure settings)
○ Using SQLite vs PostgreSQL for local development
○ Troubleshooting common deployment issues (database connection, static files
not loading)
● Hands-on: Deploy the Django app locally on your computer with all configurations and
troubleshoot any issues.
● Doubt-solving session: Help resolve deployment issues and clarify any confusion
about local setup.
1. Relational Database:
Core Features:
b. Dashboard Page:
● After logging in, the admin will be directed to the Dashboard Page.
● On this page, the admin can perform CRUD operations for the tables (Users, Artists,
Songs).
● A Logout button will be available to log out from the session.
c. Users Page:
● Admin can:
○ List all users’ records.
○ Create a new user (with necessary fields like name, email, password, etc.).
○ Update the information of an existing user.
○ Delete a user record.
d. Artists Page:
● Admin can:
○ List all artists.
○ Create a new artist with details like name, genre, etc.
○ Update the information of an existing artist.
○ Delete an artist.
○ Create Songs for each artist (attach songs to an artist’s profile).
○ List songs associated with the artist.
○ Update songs of the artist.
○ Delete songs of the artist.