Django for Professionals: Production websites with Python & Django 3.1
โ Scribed by William S. Vincent
- Publisher
- leanpub.com
- Year
- 2020
- Tongue
- English
- Leaves
- 262
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
Completely updated for Django 3.1 Django for Professionals takes your web development skills to the next level, teaching you how to build production-ready websites with Python and Django. Once you have learned the basics of Django there is a massive gap between building simple "toy apps" and what it takes to build a "production-ready" web application suitable for deployment to thousands or even millions of users. In the book youโll learn how to:
- Build a Bookstore website from scratch
- Use Docker and PostgreSQL locally to mimic production settings
- Implement advanced user registration with email
- Write comprehensive tests
- Adopt advanced security and performance improvements
- Add search and file/image uploads
If you want to take advantage of all that Django has to offer, Django for Professionals is a comprehensive best practices guide to building and deploying modern websites.
โฆ Table of Contents
Table of Contents
Introduction
Prerequisites
Book Structure
Book Layout
Text Editor
Conclusion
Chapter 1: Docker
What is Docker?
Containers vs. Virtual Environments
Install Docker
Docker Hello, World
Django Hello, World
Pages App
Images, Containers, and the Docker Host
Git
Conclusion
Chapter 2: PostgreSQL
Starting
Docker
Detached Mode
PostgreSQL
Settings
Psycopg
New Database
Git
Conclusion
Chapter 3: Bookstore Project
Docker
PostgreSQL
Custom User Model
Custom User Forms
Custom User Admin
Superuser
Tests
Unit Tests
Git
Conclusion
Chapter 4: Pages App
Templates
URLs and Views
Tests
Testing Templates
Testing HTML
setUp Method
Resolve
Git
Conclusion
Chapter 5: User Registration
Auth App
Auth URLs and Views
Homepage
Django Source Code
Log In
Redirects
Log Out
Sign Up
Tests
setUpTestData()
Git
Conclusion
Chapter 6: Static Assets
staticfiles app
STATIC_URL
STATICFILES_DIRS
STATIC_ROOT
STATICFILES_FINDERS
Static Directory
Images
JavaScript
collectstatic
Bootstrap
About Page
Django Crispy Forms
Tests
Git
Conclusion
Chapter 7: Advanced User Registration
django-allauth
AUTHENTICATION_BACKENDS
EMAIL_BACKEND
ACCOUNT_LOGOUT_REDIRECT
URLs
Templates
Log In
Log Out
Sign Up
Admin
Email Only Login
Tests
Social
Git
Conclusion
Chapter 8: Environment Variables
environs[django
SECRET_KEY
DEBUG and ALLOWED_HOSTS
DATABASES
Git
Conclusion
Chapter 9: Email
Custom Confirmation Emails
Email Confirmation Page
Password Reset and Password Change
Email Service
Git
Conclusion
Chapter 10: Books App
Models
Admin
URLs
Views
Templates
object_list
Individual Book Page
context_object_name
get_absolute_url
Primary Keys vs. IDs
Slugs vs. UUIDs
Navbar
Tests
Git
Conclusion
Chapter 11: Reviews App
Foreign Keys
Reviews model
Admin
Templates
Tests
Git
Conclusion
Chapter 12: File/Image Uploads
Media Files
Models
Admin
Template
Next Steps
Git
Conclusion
Chapter 13: Permissions
Logged-In Users Only
Permissions
Custom Permissions
User Permissions
PermissionRequiredMixin
Groups & UserPassesTestMixin
Tests
Git
Conclusion
Chapter 14: Search
Search Results Page
Basic Filtering
Q Objects
Forms
Search Form
Git
Conclusion
Chapter 15: Performance
django-debug-toolbar
Analyzing Pages
select_related and prefetch_related
Caching
Indexes
django-extensions
Front-end Assets
Git
Conclusion
Chapter 16: Security
Social Engineering
Django updates
Deployment Checklist
docker-compose-prod.yml
DEBUG
Defaults
SECRET_KEY
Web Security
SQL injection
XSS (Cross Site Scripting)
Cross-Site Request Forgery (CSRF)
Clickjacking Protection
HTTPS/SSL
HTTP Strict Transport Security (HSTS)
Secure Cookies
Admin Hardening
Git
Conclusion
Chapter 17: Deployment
PaaS vs IaaS
WhiteNoise
Media Files
Gunicorn
Heroku
Deploying with Docker
heroku.yml
Heroku Deployment
SECURE_PROXY_SSL_HEADER
Heroku Logs
Heroku Add-ons
Conclusion
Conclusion
Learning Resources
Feedback
โฆ Subjects
Computers, Programming Languages, Python, Web, Web Programming
๐ SIMILAR VOLUMES
Completely updated for Django 4.0! Django for Professionals takes your web development skills to the next level, teaching you how to build production-ready websites with Python and Django.
<div> <p>Completely updated for Django 4.0!</p> <p>Django for Professionals takes your web development skills to the next level, teaching you how to build production-ready websites with Python and Django.</p> <p>Once you have learned the basics of Django there is a massive gap between building si
<div> <p>Completely updated for Django 4.0!</p> <p>Django for Professionals takes your web development skills to the next level, teaching you how to build production-ready websites with Python and Django.</p> <p>Once you have learned the basics of Django there is a massive gap between building si