وبلاگ بلیان

Django for Professionals: Production websites with Python & Django

معرفی کتاب «Django for Professionals: Production websites with Python & Django» نوشتهٔ Arthur A Thompson، Margaret Ann Peteraf، John Gamble، A J Strickland و William S. Vincent، منتشرشده توسط نشر 2022 در سال 2022. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

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. Table of Contents 4 Introduction 12 Prerequisites 13 Book Structure 13 Book Layout 14 Community 15 Conclusion 16 Chapter 1: Initial Set Up 17 The Command Line 17 Install Python 3 19 Text Editor 21 Install Git 22 Conclusion 24 Chapter 2: Docker Hello, World! 25 What is Docker? 26 Virtual Environments vs Containers 27 Install Docker 27 Docker Hello, World 28 Install Django 29 Django Hello, World 32 Pages App 33 Docker Image 37 Dockerfile 37 .dockerignore 39 docker-compose.yml 40 Git 43 Conclusion 44 Chapter 3: PostgreSQL 45 Django Set Up 46 Docker 47 Detached Mode 49 PostgreSQL 52 docker-compose.yml 54 DATABASES 55 New Database 57 Git 58 Conclusion 59 Chapter 4: Bookstore Project 60 Docker 62 PostgreSQL 64 Custom User Model 65 Custom User Forms 68 Custom User Admin 69 Superuser 70 Tests 71 Unit Tests 72 Git 74 Conclusion 74 Chapter 5: Pages App 75 Templates 76 URLs and Views 77 Tests 80 Testing Templates 82 Testing HTML 83 setUp() 84 Resolve 86 Git 87 Conclusion 87 Chapter 6: User Registration 88 Auth App 88 Auth URLs and Views 89 Homepage 91 Django Source Code 92 Log In 95 Redirects 97 Log Out 98 Sign Up 100 Tests 104 Git 107 Conclusion 107 Chapter 7: Static Assets 108 Local Development 108 STATICFILES_DIRS 109 CSS 110 Images 111 JavaScript 113 Production 115 Bootstrap 117 About Page 120 About Page Tests 123 Django Crispy Forms 124 Git 128 Conclusion 128 Chapter 8: Advanced User Registration 130 django-allauth 130 AUTHENTICATION_BACKENDS 132 EMAIL_BACKEND 133 ACCOUNT_LOGOUT_REDIRECT 134 URLs 135 Templates 136 Log In 138 Log Out 140 Sign Up 141 Admin 143 Email Only Login 145 Tests 148 Social 150 Git 150 Conclusion 151 Chapter 9: Environment Variables 152 Environs 152 SECRET_KEY 153 DEBUG and ALLOWED_HOSTS 156 DATABASES 158 Git 159 Conclusion 159 Chapter 10: Email 160 Custom Confirmation Emails 160 Email Confirmation Page 166 Password Reset and Password Change 168 Email Service 169 Git 170 Conclusion 170 Chapter 11: Books App 171 Models 172 Admin 173 URLs 176 Views 177 Templates 178 object_list 179 Individual Book Page 181 context_object_name 183 Adding URLs 184 get_absolute_url 185 Primary Keys vs. IDs 187 Slugs vs. UUIDs 187 Tests 190 Git 192 Conclusion 193 Chapter 12: Reviews App 194 Foreign Keys 194 Reviews model 195 Admin 197 Templates 201 Tests 203 Git 204 Conclusion 205 Chapter 13: File/Image Uploads 206 Media Files 207 Models 208 Admin 210 Template 212 django-storages 216 Next Steps 216 Git 217 Conclusion 217 Chapter 14: Permissions 218 Logged-In Users Only 218 Permissions 219 Custom Permissions 220 User Permissions 221 PermissionRequiredMixin 224 Groups & UserPassesTestMixin 226 Tests 227 Git 229 Conclusion 230 Chapter 15: Search 231 Search Results Page 231 Basic Filtering 234 Q Objects 235 Forms 236 Search Form 237 Git 240 Conclusion 240 Chapter 16: Performance 242 django-debug-toolbar 242 Analyzing Pages 246 select_related and prefetch_related 252 Indexes 256 Caching 258 Front-end Assets 260 Next Steps 261 Git 261 Conclusion 261 Chapter 17: Security 263 Social Engineering 263 Django updates 264 Deployment Checklist 264 docker-compose-prod.yml 265 DEBUG 267 Defaults 268 SECRET_KEY 269 Web Security 271 SQL injection 272 XSS (Cross Site Scripting) 272 Cross-Site Request Forgery (CSRF) 273 Clickjacking Protection 274 HTTPS/SSL 275 SSL Error 276 HTTP Strict Transport Security (HSTS) 278 Secure Cookies 279 Admin Hardening 281 Git 282 Conclusion 282 Chapter 18: Deployment 284 PaaS vs IaaS 284 WhiteNoise 285 Media Files 288 Gunicorn 288 Heroku 289 Deploying with Docker 290 Heroku Deployment 291 ALLOWED_HOSTS 295 Doing It Live! 295 SECURE_PROXY_SSL_HEADER 299 Production Database 300 Heroku Logs 300 Conclusion 301 Conclusion 302 Learning Resources 303 Feedback 303
دانلود کتاب Django for Professionals: Production websites with Python & Django