Django for Professionals: Production websites with Python & Django / Django для профессионалов: Создание веб-сайтов на Python и Django Год издания: 2022 Автор: Vincent William / Винсент Уильям Издательство: Leanpub ISBN: Нет Язык: Английский Формат: PDF, EPUB Качество: Издательский макет или текст (eBook) Интерактивное оглавление: Да Количество страниц: 303 Описание: 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 Customize permissions to control user access Write comprehensive tests Adopt advanced security and performance improvements Add search and file/image uploads Deploy with confidence 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. Django для профессионалов поднимет ваши навыки веб-разработки на новый уровень, научив вас создавать готовые к работе веб-сайты с помощью Python и Django. Как только вы освоите основы Django, возникнет огромный разрыв между созданием простых "игрушечных приложений" и тем, что требуется для создания "готового к работе" веб-приложения, пригодного для развертывания тысячами или даже миллионами пользователей. В книге вы узнаете, как: Создавать веб-сайт книжного магазина с нуля Использовать Docker и PostgreSQL локально для имитации производственных настроек Внедрять расширенную регистрацию пользователя с помощью электронной почты Настраивать разрешения для управления доступом пользователей Писать комплексные тесты Внедрять передовые улучшения в области безопасности и производительности Добавлять поиск и загрузку файлов / изображений Развертывать с уверенностью Если вы хотите воспользоваться всем, что может предложить Django, Django для профессионалов - это всеобъемлющее руководство по созданию и развертыванию современных веб-сайтов.
Примеры страниц
Оглавление
Introduction 1 Prerequisites 2 Book Structure 2 Book Layout 4 Community 4 Conclusion 5 Chapter 1: Initial Set Up 6 The Command Line 6 Install Python 3 8 Text Editor 10 Install Git 11 Conclusion 13 Chapter 2: Docker Hello, World! 14 What is Docker? 15 Virtual Environments vs Containers 16 Install Docker 16 Docker Hello, World 17 Install Django 18 Django Hello, World 21 Pages App 22 Docker Image 26 Dockerfile 26 .dockerignore 28 CONTENTS docker-compose.yml 29 Git 32 Conclusion 33 Chapter 3: PostgreSQL 34 Django Set Up 35 Docker 36 Detached Mode 38 PostgreSQL 41 docker-compose.yml 43 DATABASES 44 New Database 46 Git 47 Conclusion 48 Chapter 4: Bookstore Project 49 Docker 51 PostgreSQL 53 Custom User Model 54 Custom User Forms 57 Custom User Admin 58 Superuser 59 Tests 61 Unit Tests 61 Git 63 Conclusion 63 Chapter 5: Pages App 64 Templates 65 URLs and Views 66 Tests 69 Testing Templates 71 Testing HTML 72 CONTENTS setUp() 73 Resolve 75 Git 76 Conclusion 76 Chapter 6: User Registration 77 Auth App 77 Auth URLs and Views 78 Homepage 80 Django Source Code 81 Log In 84 Redirects 86 Log Out 87 Sign Up 89 Tests 93 Git 96 Conclusion 96 Chapter 7: Static Assets 97 Local Development 97 STATICFILES_DIRS 98 CSS 99 Images 100 JavaScript 102 Production 104 Bootstrap 106 About Page 110 About Page Tests 112 Django Crispy Forms 113 Git 117 Conclusion 117 Chapter 8: Advanced User Registration 119 CONTENTS django-allauth 119 AUTHENTICATION_BACKENDS 121 EMAIL_BACKEND 122 ACCOUNT_LOGOUT_REDIRECT 123 URLs 124 Templates 125 Log In 127 Log Out 129 Sign Up 130 Admin 132 Email Only Login 134 Tests 137 Social 139 Git 139 Conclusion 140 Chapter 9: Environment Variables 141 Environs 141 SECRET_KEY 142 DEBUG and ALLOWED_HOSTS 145 DATABASES 147 Git 148 Conclusion 148 Chapter 10: Email 149 Custom Confirmation Emails 149 Email Confirmation Page 155 Password Reset and Password Change 157 Email Service 158 Git 159 Conclusion 159 Chapter 11: Books App 160 CONTENTS Models 161 Admin 162 URLs 165 Views 166 Templates 167 object_list 168 Individual Book Page 170 context_object_name 172 Adding URLs 173 get_absolute_url 174 Primary Keys vs. IDs 176 Slugs vs. UUIDs 176 Tests 179 Git 181 Conclusion 182 Chapter 12: Reviews App 183 Foreign Keys 183 Reviews model 184 Admin 186 Templates 190 Tests 192 Git 193 Conclusion 194 Chapter 13: File/Image Uploads 195 Media Files 196 Models 197 Admin 199 Template 201 django-storages 205 Next Steps 206 Git 206 CONTENTS Conclusion 206 Chapter 14: Permissions 207 Logged-In Users Only 207 Permissions 208 Custom Permissions 209 User Permissions 210 PermissionRequiredMixin 214 Groups & UserPassesTestMixin 215 Tests 216 Git 218 Conclusion 219 Chapter 15: Search 220 Search Results Page 220 Basic Filtering 223 Q Objects 224 Forms 226 Search Form 226 Git 229 Conclusion 229 Chapter 16: Performance 231 django-debug-toolbar 231 Analyzing Pages 236 select_related and prefetch_related 242 Indexes 245 Caching 247 Front-end Assets 249 Next Steps 250 Git 250 Conclusion 250 CONTENTS Chapter 17: Security 252 Social Engineering 252 Django updates 253 Deployment Checklist 253 docker-compose-prod.yml 254 DEBUG 256 Defaults 257 SECRET_KEY 258 Web Security 260 SQL injection 261 XSS (Cross Site Scripting) 261 Cross-Site Request Forgery (CSRF) 262 Clickjacking Protection 263 HTTPS/SSL 264 SSL Error 265 HTTP Strict Transport Security (HSTS) 267 Secure Cookies 268 Admin Hardening 270 Git 271 Conclusion 271 Chapter 18: Deployment 273 PaaS vs IaaS 273 WhiteNoise 274 Media Files 277 Gunicorn 277 Heroku 278 Deploying with Docker 279 Heroku Deployment 280 ALLOWED_HOSTS 284 Doing It Live! 284 SECURE_PROXY_SSL_HEADER 288 CONTENTS Production Database 289 Heroku Logs 289 Conclusion 290 Conclusion 291 Learning Resources 292 Feedback 292
Vincent William / Винсент Уильям - Django for Professionals: Production websites with Python & Django / Django для профессионалов: Создание веб-сайтов на Python и Django [2022, PDF, ENG] download torrent for free and without registration
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum