Django for Professionals: Production websites with Python & Django 3.1
Book information
Description
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 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
Similar books
Modern Programming Made Easy: Using Java, Scala, Groovy, and JavaScript, 2nd Edition
2020 · PDF
Modern Programming Made Easy: Using Java, Scala, Groovy, and JavaScript, 2nd Edition
2020 · EPUB
HTML and CSS: Design and Build Websites
2011 · EPUB
Understanding Network Hacks: Attack and Defense with Python 3, 2nd Edition
2021 · EPUB
Foundations of PyGTK Development: GUI Creation with Python, 2nd Edition
2019 · EPUB
Game Development Using Python
2018 · PDF
Python for Scientists, 2nd Edition
2017 · AZW3
Mastering Social Media Mining with Python
2016 · PDF