Django for Full Stack Web Applications
This book follows a hand one approach to learning django by building an ecommerce web application. This book is perfect for a django developer who wants to learn how to make web applications with django quickly without the hassle of integrating with other frontend frameworks.
The first Chapter will cover the basic fundamental concepts and components of django applications. We will delve into the structure of a Django project and explore how models, views, urls, and templates interact to create dynamic web applications. You will also learn how URL routing works and how to handle HTTP requests and responses.
You will also learn how Django uses Django’s built-in ORM for seamless database integration. Armed with this knowledge, you will be well-prepared to embark on more advanced topics in subsequent chapters, where we will explore authentication, form handling, Context Processor, and Payment Integration while building a fully functional ecommerce website.
For the rest of the chapters, we will build a django ecommerce application called LUX with the following features:
- User Authentication and Registration: Users can create accounts, log in, and reset their passwords securely.
- Product Management: A product management system where admins can add, edit and delete products
- Shopping Cart and Checkout: A shopping cart functionality where users can add products and update quantities.
- Payment integration with Stripe. We will also integrate a secure checkout process with Stripe payment processing gateway for online transactions.
- Search Functionality: search feature that will allow users to search for products.
- Wish Lists: A wishlist feature allowing users to favorite their desired items.
- Order management. Users will be able to see their order history and their order status.
- Email Notifications: Set up automatic email notifications for order confirmations
Contents
Chapter 1 : Introduction
- Prerequisites:
- Why Django
- Virtual Environments
- Your First Django Project
- Django development server
- Django Apps
- Your first django view
- Templates and Urls
- Urls patterns
- Django template engine
- Loops and conditionals in templates
- Template Inheritance
- Static filesChapter 2 : Database and Models
- Migrations
- Database Relationships
- Dunder methods
- The Django ORM
- Creating objects
- Updating objects
- Deleting objects
- Retrieving objects
- Django Admin
- Generic Views
- ListView
- DetailView
- Generic Editing Views
- CreateView class
- UpdateView
- DeleteView
Chapter 3: Build an Ecommerce Application
- Getting Started
- Custom User
- Product Models
- ProductListView and ProductDetail
- Add to Cart Form
- Add to Cart ViewUpdate Cart Items
- Remove Item from Cart
- Search For Products.
- Advanced Search with Q Objects
- Context Processors
Chapter 4 : CheckOut and Payment Integration
- OrderForm
- Checkout Page
- Crispy Forms
- Stripe Integration
- How Stripe Checkout Works
- Stripe Checkout Example
- Create Order and Make Payment
- Stripe WebHooks
- Stripe CLI
- Webhook Endpoint
- Emails
- Send Emails with MailTrap
CHAPTER 5 Authentication
- UserCreationForm
- Register users
- Login Page
- Logout Users
- Password Reset
- Orders page
- Pagination
- Order Items Page
- Add Products to Wishlist
- Display Wishlist
CHAPTER 6: DEPLOYMENT
- Deployment Checklist
- Environment Variables
- Static Files in Production
- Requirements
- Railway Production Configurations
- Allowed Hosts
- Create a Github Repo and a Railway Account
- Conclusion
- Additional resources
What's Included
A PDF and a resources zip file containing the full source code.
A PDF and a resources zip file containing the full source code.