
Django Framework
Learn to Develop Professional Web Apps with Python Using Django
What you'll learn
- Install Python and Django
- Create a project and an app in Django
- Work with URLs and Views
- Show HTML pages with Templates
- Use logic syntax and file inheritance
- Build the Model and work with databases
- Add data from the admin page
- Work with Forms and the Post and Get methods
- Build a personal Portfolio website
- Build an online store website that takes orders
About this course
This course teaches the Django framework for developing web applications and websites with Python. Django is an open-source system that makes building websites easy and fast thanks to its ready-made libraries. You start with the course introduction and installing Python and Django, then create your first project and your first app inside it. Next you learn the basic theory of building websites, working with URLs and Views, passing values through the link, showing HTML pages through Templates, logic syntax and file inheritance. Then come the Model, databases and the admin page, plus Forms and the Post and Get methods. You apply all this in three projects: a multi-page personal Portfolio website, an online store website for taking orders, and a project for working with databases. The course suits anyone who knows the basics of Python and wants to build websites. Each lesson explains one step with a simple example so you understand it before moving on. By the end, you will be able to build a complete website with Django from scratch and connect it to a database.
Expected outcomes
- Master the use of the Django framework.
- Create professional and responsive websites.
- Understand how to work with databases and HTML templates.
- Build practical projects applicable in real life.
Learner reviews
Course content
1Learning Django from A to Z
2 lectures
- Course IntroductionIntroduction to the Django framework course, explaining that it is a web development framework built on Python and that learners need prior programming knowledge, especially Python, before starting.1:35
- Fundamental Theories for Building Websites Using DjangoExplains the core theory behind Django: what a Framework is, the Request and Response cycle from the URL to the View, Model, and Template, and splitting a project into apps.8:37
2Essential Tasks
7 lectures
- Installing Python and DjangoExplains installing Python and Django: checking the Python version, making sure the Add Python to PATH option is ticked during installation, then installing Django with pip and verifying its version.5:53
- Creating Your First Project with DjangoCreates the first Django project step by step, explains its file and folder structure, opens it in Visual Studio Code, and runs it on the default port, including how to change the port number.14:48
- Creating Your First Application Within the ProjectExplains the difference between a Project and an Application in Django, showing how splitting a project into apps separates responsibilities, then creates the first app and reviews its files such as admin, models, and views.11:57
- The Most Common Method for Installing Django and Creating a ProjectExplains the most common way to install Django: creating a Virtual Environment for each project and activating it, then installing Django inside it and creating the project and the blog app.9:28
- Handling Links and ViewsExplains how a URL is handled by a View: the urls.py file in each app, defining a path and linking it to a function in views.py, receiving the request, and returning a response.23:50
- Sending Values Through the URLExplains passing values through the URL: the urls file and URL patterns, sending parameters with path converters to the view function, naming a path and using that name in links, and returning an HTML response.14:30
- Displaying HTML Pages Through TemplatesExplains displaying HTML pages through Templates using the render function instead of HttpResponse, specifying the Template name, and passing data from the URL to the page.11:22
3Advanced Tasks
6 lectures
- Method for Handling Data Display Within the TemplateExplains how to pass data from a view to a Template and display it in an HTML page: plain variables, filters such as date formatting and default values, lists, and dictionaries.15:54
- Using Logic SyntaxExplains using logic syntax in Templates: the for loop to display list items, building dynamic links with the url tag while passing an id, and template inheritance.15:56
- File Inheritance Within TemplatesExplains template inheritance: creating a base file that holds the parts shared across pages, then using extends and block in the other pages to avoid repeating code.10:37
- Handling Databases Through the ModelIntroduces the Django Model as a class inheriting from models.Model that represents a database table, and reviews field types such as text, numbers, and relationships along with attributes like blank.6:22
- Building the Model and Migrating to Link it to the DatabaseBuilds a Post Model in practice with text fields, a date, and choices, then runs makemigrations and migrate to create the table, and views the SQLite file using the DB Browser tool.13:31
- Handling the Model and Adding Data Through the Admin PageWorks with the Model through the Admin page: registering Post with admin.register, adding data from the admin panel and checking it in DB Browser, customizing list_display, and editing and deleting records.11:17
4Project: Creating a Personal Website with Multiple Pages
7 lectures
- Personal Website Project with Multiple Pages (1)Starts a personal portfolio website project in Django: creating the project folder and a virtual environment, installing Django, running startproject, launching the local server, and then creating the first app inside it.5:14
- Personal Website Project with Multiple Pages (2)Continues the portfolio project by creating the first view and a simple HTML file, linking them through the app's urls file and including it in the project urls, until a Hello World page appears.5:26
- Personal Website Project with Multiple Pages (3)Builds the Model for the portfolio project, a Job with an image, a title, and a summary, setting up image uploads with ImageField and running makemigrations and migrate to create the table.4:43
- Personal Website Project with Multiple Pages (4)Connects the project to a PostgreSQL database instead of SQLite: installing it and creating a database, configuring the DATABASES settings, installing the psycopg2 library, then running migrate and seeing the Job table.10:34
- Personal Website Project with Multiple Pages (5)Configures the Admin panel for the portfolio project: registering the Model, creating a superuser, adding jobs with their images, customizing list_display, then showing the Job data on the home page.9:22
- Personal Website Project with Multiple Pages (6)Designs the home page template in the portfolio project using a ready-made Bootstrap template, edits the header and content, then uses a for loop to display the Job items stored in the database.10:01
- Personal Website Project with Multiple Pages (7)Finishes the portfolio project by displaying uploaded images: setting MEDIA_URL and MEDIA_ROOT in the settings, adding the static route in urls, then adjusting the layout and adding social media links.9:53
5Forms
2 lectures
- General Introduction to FormsIntroduces Forms in Django and why they matter for user interaction, such as comments, login, and orders, and outlines the topics ahead, including protection against Cross Site Scripting and validating values.1:45
- Explanation of Basic Theories for Form & Post & GetExplains the difference between the GET and POST methods for sending form data and which better protects it, then Cross Site attacks and securing the form with a csrf token inside the Template.7:32
6Project: Creating an Online Sales and Order Website
9 lectures
- Online Sales Website Project and Order Requests (1)Begins an online pizza ordering project to apply Forms in practice: creating the project and app, defining the views, urls, and Template files, and displaying the Home and Order pages.9:57
- Online Sales Website Project and Order Requests (2)Builds the pizza order form in HTML with input fields for toppings and size plus a submit button, then shows that GET exposes values in the URL while POST requires a csrf token, otherwise a Forbidden page appears.7:43
- Online Sales Website Project and Order Requests (3)Builds the pizza order form with Django's Forms library: a class inheriting from forms.Form, displaying it in the view, validating values with is_valid, and sending a success message when the data is valid.22:01
- Online Sales Website Project and Order Requests (4)Creates the pizza project's Models, Size and Pizza, links them with a foreign key using cascade delete, adds a __str__ method, then runs makemigrations and migrate and registers the tables in the Admin panel.10:48
- Create an Online Sales Website and Order Requests (5)Links the order form to the Model using ModelForm instead of a plain Form, and displays size options from the database with ModelChoiceField and a query set, so admin changes appear on the site right away.9:03
- Create an Online Sales Website and Order Requests (6)Shows the saved pizza orders and lets the user edit an order: saving the order to the database, passing the order id to the Template, and creating an edit link with a confirmation message.10:56
- Create an Online Sales Website and Order Requests (7)Adds order listing and editing to the pizza project: fetching orders from the database, validating the form on edit, saving the changes, and showing the current data in the fields.16:24
- Create an Online Sales Website and Order Requests (8)Improves how the order form is displayed in a Template: rendering fields as paragraphs with as_p or as a table with as_table, then styling it with the crispy forms library after installing it and updating the settings.8:22
- Create an Online Sales Website and Order Requests (9)Wraps up the pizza site design using a ready-made Bootstrap template in a base file, with blocks for each page, then displays an image from the static folder on the home page using the load static tag.9:03
7Project: Creating Database-Driven Websites
13 lectures
- Project for Creating Database-Driven Websites (1)Presents the final project, a complete notes application backed by a database, and demos its features: registering a new user, logging in, and adding, viewing, editing, and deleting notes.5:36
- Project for Creating Database-Driven Websites (2)Sets up the notes application project: creating the project folder and a virtual environment, installing Django, creating the project and app, then defining a first simple view, wiring it to the urls, and running the server.6:12
- Project for Creating Database-Driven Websites (3)Adds a separate app for the home page in the notes project with its own urls and Templates, displays variables such as the date and time on the page, and includes the app's urls in the project.7:16
- Project for Creating Database-Driven Websites (4)Works with the database and Admin page in the notes project: running migrate, creating users with permissions and deleting them, then restricting a page to logged-in users with the login_required decorator.13:14
- Database Interaction Website Project (5)Creates the first Model in the notes project with title, text, and creation date fields, explains the role of the ORM, runs makemigrations and migrate, then registers the Model in Admin with a ModelAdmin class.8:33
- Database Interaction Website Project (6)Displays notes data from the database: a list view and a detail view that receives the note id, wiring both to the urls, creating their Templates, and handling a note that does not exist.13:06
- Database Interaction Website Project (7)Introduces Class Based Views in Django as an alternative to function views, such as TemplateView, ListView, and DetailView, and converts the notes pages with them to cut code and set the model and template.12:39
- Database Interaction Website Project (8)Adds static files and interface styling to the notes project: creating a static folder and a CSS file, loading it with the load static tag, and building a shared base template that the pages inherit.10:17
- Database Interaction Website Project (9)Improves the notes site design with Bootstrap styling: linking the CSS file, building a navigation bar with page links, showing notes in cards, using filters to truncate text, and linking each note to its detail page.10:38
- Database Interaction Website Project (10)Explains how Django lets a regular user add data to the database through a create view and a ModelForm, covering the model, fields, post-success redirect, form styling and the submit button.12:04
- Database Interaction Website Project (11)Explains building edit and delete pages in Django with update and delete views, including a delete-confirmation template and cancel and back links to the notes list.11:59
- Database Interaction Website Project (12)Explains linking notes to their user and restricting pages to logged-in users, then building login and logout pages with Django's built-in LoginView and LogoutView and setting the redirect afterwards.13:47
- Database Interaction Website Project (13)Explains building a sign-up page in Django with a CreateView and registration form, styling it, and adding a navigation bar whose login and logout links depend on the user's status, then wraps up the project.12:00
8Attachments
3 attachments
- Download Codes and Files for Portfolio Project
- Download Codes and Files for Online Sales Project
- Downloading Project Database Codes and Files
Instructor

Eng. Amr Abdel Fattah
This course is part of the diploma




