
Build and deploy a Django 4 marketplace web app from setup to deployment, covering models, views, templates, authentication, Tailwind styling, CRUD operations, and Stripe payments.
Understand the client-server architecture behind websites, how servers query databases and respond to browsers, and how Django, a free open source back end framework, provides an automatic admin panel.
Install Python on Windows by downloading the latest Python, running the installer, and adding Python to the path; then verify the installation with Python --version in cmd.
Learn to create isolated virtual environments on Windows using Python and pip, enabling multiple Django versions for different projects and guiding you to install and initialize your own environment.
Create a project container folder, navigate there in the terminal, create a virtual environment named envy, and activate it via the scripts to prep for Django installation.
Activate your virtual environment and install Django using pip, targeting version 4.0, to set up your first Django project on Windows.
Activate your virtual environment, install Django, and create a Django project with django-admin startproject my site, then open the my site folder in Visual Studio Code to explore the files.
Install Python on Mac by downloading official Python 3.10 installer, verify with terminal, note Mac ships with Python 2; use Python 3 for version 3, and prepare for virtual environments.
Install and configure a virtual environment on macOS using pip, pip3, and virtualenv to isolate Python projects before installing Django.
Create a virtual environment on your mac desktop, name it, and navigate into it to verify. Activate with source bin/activate, deactivate when needed, and install Django inside this environment.
Learn how to create and inspect a Django project structure using manage.py, start project, and a site folder named 'my site', including core files like __init__.py, settings.py, urls.py, and wsgi.py.
Learn to run a Django project on a local server with manage.py, start the development server on the loopback address port 8000, and stop it with Ctrl+C.
Learn how to create an app inside a Django project using the startapp command, name the app, and understand app versus project within a larger site.
Explore how to create a Django view that handles requests and returns a response, and wire it into URL patterns to display hello world through a simple route.
Create an app-level urls file, include it in the project’s root, and map an empty path to the app’s index view using path and include, with proper imports.
Create a view named products that returns products via HttpResponse. Map it to /products in urls.py and note moving from a hard-coded list to database-driven data using models.py.
Learn how Django models act as blueprints to create database tables automatically, eliminating manual sql queries and connections, and map models to backend tables.
Learn how Django stores data with a lightweight, file-based database and the object relational mapper, by defining models to create a product table with id, name, category, and supplier.
Discover how Django creates database tables behind the scenes by defining models, with the Django ORM automatically handling table creation and data insertion in the backend.
Learn how Django’s built-in ORM lets you create and query database records as objects, and enable admin data management by creating a superuser to access the Django admin panel.
Discover retrieving products with django orm: list all via product.objects.all, customize displays with __str__, fetch by get, and access name, price, and description, plus admin panel basics.
Access the built-in Django admin panel by running the server and creating a super user to log in, then register the product model to manage products in admin.
Retrieve all products from the database in the products view using Product.objects.all, then render an HTML page to display the items in a better fashion.
Create and render dynamic HTML with Django templates by placing templates in templates/myapp and naming the file index.html, using the templating engine to render it in a view.
Render the template using a view and the render method, passing a context dictionary with products, then access and iterate the products in the template.
Learn how to use Django template for loops to iterate over products, access object properties like name, price, and description, and format output with HTML and separators.
Create a django product detail view that accepts a numeric id, configure a URL pattern like products/<int:id>/, and render a detail page showing the selected product by its id.
Learn to fetch a single product by id, pass it as context to a detail template, render the product detail page, and create clickable links to each item’s detail page.
Turn product listings into clickable links by wrapping each item and generating dynamic URLs with product.id, avoiding hardcoded paths, then display name, price, and description on the detail page.
Remove hardcoded urls by naming url patterns and referencing them in templates with the route name. Pass the dynamic product id to the named product_detail route in the template.
Learn how Django namespaces URL patterns to prevent conflicts across apps by prefixing patterns with the app name, enabling references like my_app:product_detail.
Learn to style a Django project with Tailwind utility classes, set up Tailwind in Django, and create a navigation bar for deployment.
Install Node.js and npm to enable Tailwind in the Django project. Download the long-term supported version from the Node website, run the installer on Mac, and verify the installation.
Install tailwind in a django project using npm in the my site directory, create a source file in static, and build a compiled stylesheet from tailwind components and utilities.
Design a navigation bar for a Django site using Tailwind utilities, add a logo via the static tag, and use flex to align the logo with the site title.
Design a responsive navigation bar by turning the logo into a clickable link, using flex for alignment, and highlighting the active item with a bottom border.
Apply the base template with tailwind styling to the detail view by extending from the base template, defining block content, and centralizing the navigation bar.
Create a responsive product card grid with tailwind, where each card shows an image, product name, price, and description, with spacing, typography, and a clickable card layout.
Explore styling the product detail page: create a left image and right details layout, add a heading, and apply spacing, typography, and color tweaks.
Design forms in Django to perform create, read, update, and delete operations, enabling end users to manage data and master crud in Django to build basic web apps.
Explore handling form data in Django: process post requests, read data from request.POST and request.FILES with multipart/form-data, and save a product model instance using the ORM.
Test the form by adding a bicycle with a 200 price and image, verify the product appears, and note that the next lecture will style the form.
Style the add product form in the Django 4 masterclass, extending the base template, structuring labeled inputs, and applying responsive, green-styled controls for a polished UI.
Extract the product by its id, pass it as context to the update form, and populate fields with name, price, description, and image for backend update.
Learn how to implement update functionality in Django by handling post requests, updating product fields (name, price, description, image) directly on the model, and redirecting to the product list page.
Style the delete form with utility classes to create a card layout, add a red confirm button and a green cancel link to products, finishing crud operations and introducing authentication.
Learn to implement authentication in a Django app by registering and logging in users, restricting page access to authenticated users, and designing logout functionality.
Learn how authentication protects a site by registering users and requiring login before posting ads; we create a dedicated authentication app to separate concerns.
Create a custom registration form in Django by subclassing the built-in user creation form, importing from django.contrib.auth.forms, and exposing email, username, password1, and password2 fields.
Render the new user form on your site by importing the form, creating a register view, and passing the form as context to a template for display.
Render the registration view by wiring the users app URLs, adding a register path, and serving the registration form with username, email, and password fields.
Design a functional Django registration form by splitting fields (username, email, password1, password2), styling inputs and labels, and extending from the base template.
Customize a Django form by overriding field widgets to remove focus outlines, add placeholder and CSS class attributes, and configure email, username, and password inputs for a registration form.
Complete the register functionality by handling post requests, validating and saving new users via the form, and redirecting to the login page after registration.
Create the login using Django's built-in authentication views, import them, map a login URL, and render a template with username and password fields.
Style the login form by adapting the register form, using username and password, test with admin and new user logins, and set up logout in the next lecture.
Attach Django's built-in logout view to a log out URL, create a log out.html template showing the message you have been locked out, and verify the logout flow.
Display a login or logout option in the base template navbar by using the user's is_authenticated status to conditionally render login and logout links.
Learn to restrict access to Django views using the login required decorator, create a user profile page, configure login redirects, and protect pages from unauthenticated users.
Django 4 Masterclass 2022 : Build Web Apps With Django
Here Is What You Get By Enrolling In This Course:
Word-By-Word Explanation: In the entire course, I explain each line of code, without skipping a single line of code.
Awesome Quality Content: Over 11+ hours of HD Videos.
Well Structured & Easy To Learn: Course has been specially designed to make it easy for the students to learn Django starting from a basic level and gradually moving up to advance concepts.
24 X 7 Support: I will always be there to guide you in your journey to become a Django expert.
Here Is Everything You Will Learn In This Complete Course:
In this hands-on course, you will learn how to build complex web applications from scratch using Django.
The course will teach you Django, right from scratch from a very basic level and will gradually move towards advanced topics like authentication.
The entire course is divided into 14 major sections.
Here is a brief description of what you will learn in each section of the course:
Section 1: Introduction and installing required software.
In this section we will learn what Django is and why it is used. We will also install the tools you will need to start making Django web apps. We will learn how to install Django and setup a Django project both on Windows & Mac individually.
Section 2: Views & URL Patterns
Django is based on the MVT(Model, Views & Templates) architecture and hence we start learning about what are views, how to create our very first view in Django which will power up our first webpage in Django. We then learn how to attach a view with a URL using URL patterns. We learn what are URL patterns and how they can be used to handle incoming URL requests to our Django app. This view section covers function based views as they are much simpler and offer more functionality, however in the later part of the course we will also learn class based views as well which is another way of implementing views in Django.
Section 3: Database & Models In Django
After learning about Views and URLs, it's now time to learn about models. In Django models are a blueprint to create database tables. Unlike other backend frameworks, in Django you don't have to create a database connection and then create database tables by writing SQL queries but instead Django provides you with models using which database tables are automatically generated at the backend without having to write a single SQL query. In this section we learn how to create a model and how to map that model to create a database table out of it in the backend.
Section 4: Django ORM
Just as you don't have to write SQL queries to create a model, you don't have to write any queries for querying data from the database either. Django comes with a built-in ORM which stands for Object Relational Mapper which allows you to treat database table entries as individual objects. In this section we learn how to add data to database tables using the ORM and also learn how to retrieve data as well from the database using the same. We also learn how to access the Django admin panel by creating a super user from where data could be added by the site administrator.
Section 5: Views & Templates
Once we have learned the basics of how views work in Django, we now learn how to populate these views with some database data. We also learn how to connect these views with templates which are nothing but HTML pages rendered dynamically by Django. We also learn how dynamic database data can be injected into these templates by passing context. We also learn how to create detailed views for products and handling hardcoded URLs associated with these detail views.
Section 6: Adding Styling To Django Project With CSS & Tailwind
After making a barebones app, we now learn how to style up our Django app. There are multiple CSS frameworks and libraries that can be used for styling apps but the one we will be using is Tailwind CSS. It is one of the most modern ways of styling the webpage. With its utility classes we can style every element of our webpage inline without having to create an external CSS file for it. We will learn how to setup Tailwind for a Django project, how to create a navigation bar with it and also how to stye out Django powered webpages with Tailwind.
Section 7: Form & CRUD Operations In Django
Every web application has to perform basic operations like create, read, update & delete data which is also termed as CRUD. In this section we will learn how to design forms in Django so that the end user of our website could perform all these four operations without any issues. Once you learn how to implement CRUD in Django you will be capable of building almost any basic web application in Django.
Section 8: Authentication
It important that we limit certain features of our website to registered users and this is exactly what we will be learning in this section. We learn how to register a user to our Django app, how to login a user and how to control access to certain pages and certain actions to just these logged in users. We also learn how to design the logout functionality so that the users could log out of our application. This entire process is called authentication and we will learn how to implement authentication in our Django app.
Section 9: Creating User Profile
Every registered user must have their own profile, in this section we will start off by learning how to add a functionality that allows every user to create their own profile. We will then learn how to associate a user with the products which they have posted for selling on our Django web app. This can be done by using relationships and keys between two models. We will connect the user model with the product model so that every product would be associated with a user. We will also create a listing page for every user where they can view all the products listed by them on our web app.
Section 10: Class Based Views In Django
We have already learned about the function based view in the earlier part of the course but there is an alternative and a cleaner approach of creating views and that is using class based views. In this section we will re-create every single function based view which is present in our application into a class based view and in the process also learn about the generic views offered by Django such as the ListView, DetailView, CreateView, UpdateView & the DeleteView. we also learn how to add a redirect URL to these views as well.
Section 11: Customising Admin Panel
Every Django application we create comes with a built in Admin panel & it provides us with a functionality to customise this admin panel as per our own needs. In this section we will learn how we could modify the admin headers, how to add custom fields to our model in the admin panel, how to add custom search fields and custom actions as well and how to make fields of a model editable inside the admin panel.
Section 12: Pagination & Search
Displaying hundreds of products on a single page can be challenging, loading them all on a single page might increase the page load times and here is where pagination comes into picture. Pagination is a process of spreading out items in your database to multiple web pages instead of listing them all on a single page. This ensures a better user experience and quick page load times. In this section we will learn how to implement pagination functionality in our Django application and also implement a search functionality which allows users to search multiple products on our web application.
Section 13: Payment Gateway Integration With Stripe
Accepting payments is an integral part of any commercial website, hence in this section we will learn how to integrate stripe payment gateway into our Django app so that end users could pay for products and buy them. We will learn how to create a stipe account, how to add secret keys to our application ,we learn how to design the payment and checkout flow to buy any product on our site and return a payment success view upon successful payment. This payment flow could be integrated into any other Django application which you could create.
Section 14: Deployment
This is one of the most interesting part of the course because we will finally be able to deploy our website to the public internet where anyone in the world could access it. We will be using Git & GitHub to initially host our entire project code online and then deploy the same code form GitHub to DigitalOcean app platform. We learn how to create a code pipeline in such a way that code could be deployed from your local code editor, to Git, to GitHub and finally to DigitalOcean app platform. We learn how to set the environment variables to keep our secret app key private and also learn how to host a remote database and then connect it to our deployed Django application. We will also learn how to fix any issues which may arise in the due process.
So let's begin the journey of becoming a Django expert.
In addition to the Udemy 30-day money back guarantee, you have my personal guarantee that you will love what you learn in this course. If you ever have any questions please feel free to message me directly and I will do my best to get back to you as soon as possible!
Make sure to enrol in the course before the price changes.
Take yourself one step closer towards becoming a professional Django developer by clicking the "take this course button" now!
Join the journey.
Sincerely,
Ashutosh Pawar