جزییات کتاب
Django is a Python based open source web development framework that has been around since 2005. It enables you to create complex database-driven websites while keeping things decoupled and dry. Django is used by some well-known sites like Instagram, Bitbucket and Disqus. About this bookThis book is about learning the Django web framework with simple, practical examples. We will work on many small projects rather than working on a single big application through the book. By the end of the book you should have a solid understanding of how to build and deploy apps with Django. Who is this book for?This book is suitable for beginner to intermediate level web developers. You don't have to have any experience with Django or building web applications in general. We start with the very basics and increase complexity as we go along. What this book is NOT about?We use Bootstrap 4 to have a decent looking testing playground but otherwise frontend concepts are covered minimally. This is not a book about Python, HTML, CSS or JavaScript. Basic knowledge about those technologies would be helpful but is not required for the book. The focus is on the Django web framework core concepts and deployment practices. How this book is organizedThis book is organized in 32 chapters that focus on key concepts of the framework. I recommend reading the book in sequence, starting from the very beginning and working your way to the end from there. Chapters 1-7Chapters 1-7 cover how to install Python and use virtual environments. Chapters 8-10In chapters 8-10 we create a simple Django project and examine the project structure. "Hello world" project introduces the reader to views, paths and templates. Chapters 11-13Chapters 11-13 cover how the template inheritance works and how to integrate Bootstrap 4 frontend framework with Django. We also apply custom styles with CSS (Cascading Style Sheets). Chapters 14-16Chapters 14-16 cover how to use models and interact with a database. We learn about filters and how to build a base project that can be used as a starting point for other projects. We create a detail page and learn how to work with slugs and reverse URLS. Chapters 17-20In chapters 17-20 we learn how to categorise items with a ForeignKey field and tag items with a ManyToManyField. We do lookups through relationships, re-use templates and build a minimalistic search feature. Chapters 21-24Chapters 21-24 show how to create forms with ModelForm. We customize the forms by changing field order and render validation errors manually. The Python interactive interpreter is used to manipulate objects and interact with Django. Chapters 25-26Chapters 25-26 cover how to create a complete authentication system with the Allauth package and how to theme the default forms with Bootstrap 4. User authorization is managed with groups and decorators. Chapters 27-28In chapters 27-28 we upload images and serve them from a local media folder. Bootstrap 4 is used to create a grid view to display the images. The uploaded images are compressed to thumbnails using the ImageKit package. Chapters 29-32Chapters 29-32 show how to deploy to Heroku platform and serve static assets and user-uploaded files from an Amazon AWS bucket. We learn how to establish continuous deployment workflows with Heroku pipelines and send emails with SendGrid.