A Beginner's Guide To Django

Learn how to build and deploy web applications with Python and Django.
eBook in PDF, EPUB and MOBI formats.
Secure payments with

1. Python Installation & Test Project

We start by installing Python and creating a simple test project.

2. Virtual Environment

Project dependencies (packages the project depends on) are isolated using a virtual environment.

3. Requirements

Dependencies are installed using requirement files. Each environment gets its own file.

4. Pizzeria Project

Create a new project directory structure and learn about the default configuration files.

5. Settings

Each environment gets its own settings file that configures the project.

6. Environment Variables

Sensitive data (like passwords) are stored as environment variables.

7. PostgreSQL

PostgreSQL database is used in development and production environments.

8. Pages App

Use apps to add new features to the project (home and about page).

9. Bootstrap & Template Inheritance

Add a responsive theme using Bootstrap frontend framework.

10. Pizzas App

Pizzas app allows users to create, edit, display and delete pizzas.

11. Pizza Model

Pizza model describes how each pizza is stored in the database.

12. Toppings ManyToMany Relationship

Toppings demonstrate how to use ManyToMany relationships.

13. Images

Each pizza can have an image. Smaller thumbnails are generated using the django-imagekit library.

14. Forms

Django's generic class-based editing views makes it easy to create custom forms.

15. Detail Page

Each pizza have its own detail page. SlugField is used to create user-friendly paths (pizzas/quattro-stagioni/).

16. Search With Pagination

Search pizzas with keywords and add a re-usable pagination.

17. Authentication

Add an authentication system that allows users to sign-in and log-in to the site.

18. Permissions

Restrict access to parts of the site using groups and permissions.

19. Static Files (CSS, Sass & JavaScript)

Override Bootstrap styling with your custom CSS and manipulate web pages using JavaScript.

20. Messages & Context Processors

Show temporary messages and display dynamic data on every page.

21. Amazon S3 Storage & CloudFront

Store static files (CSS, images and JavaScript) and user uploaded media (pizza images) in Amazon S3 bucket and serve files using CloudFront (content delivery network).

22. Deployment To Heroku

Deploy the website to Heroku cloud application platform.

23. Extras: Function-based Views (Forms with ModelForm)

Allow visitors to send feedback (and provide a screenshot).