• Complain

William S. Vincent - Django for Professionals: Production websites with Python & Django 4.0

Here you can read online William S. Vincent - Django for Professionals: Production websites with Python & Django 4.0 full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2022, publisher: leanpub.com, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

William S. Vincent Django for Professionals: Production websites with Python & Django 4.0
  • Book:
    Django for Professionals: Production websites with Python & Django 4.0
  • Author:
  • Publisher:
    leanpub.com
  • Genre:
  • Year:
    2022
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Django for Professionals: Production websites with Python & Django 4.0: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Django for Professionals: Production websites with Python & Django 4.0" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

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.

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 youll 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.

William S. Vincent: author's other books


Who wrote Django for Professionals: Production websites with Python & Django 4.0? Find out the surname, the name of the author of the book and a list of all author's works by series.

Django for Professionals: Production websites with Python & Django 4.0 — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Django for Professionals: Production websites with Python & Django 4.0" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Django for Professionals Production websites with Python Django William S - photo 1
Django for Professionals
Production websites with Python & Django
William S. Vincent

This book is for sale at http://leanpub.com/djangoforprofessionals

This version was published on 2022-06-02

This is a Leanpub book Leanpub empowers authors and publishers with - photo 2

* * * * *

This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.

* * * * *

2018 - 2022 William S. Vincent
Introduction

Welcome to Django for Professionals, a guide to building professional websites with the Django, a Python-based web framework. There is a massive gulf between building simple toy apps that can be created and deployed quickly and what it takes to build a production-ready web application suitable for deployment to thousands or even millions of users. This book will show you to how to bridge that gap on both Windows and macOS computers.

When you first install Django and create a new project the default settings are geared towards local development. And this makes sense: theres no need to add all the additional features required of a large website until you know you need them. These defaults include the use of SQLite as the default database, a local web server, local static asset hosting, built-in User model, DEBUG mode turned on, and many other settings that are implicitly set.

For a production project many, if not most, of these settings must be reconfigured. And even then there can be a frustrating lack of agreement among the experts. Rather than overwhelm the reader with the full array of choices available this book shows one approach for building a professional website grounded in current Django community best practices. The topics covered include using Docker for local development and deployment, PostgreSQL, a custom user model, robust user authentication flow with email, comprehensive testing, environment variables, security and performance improvements, and more.

By the end of this book you will have built a professional website step-by-step and learned about additional areas for further exploration. Whether you are starting a new project that hopes to be as large as Instagram (currently the largest Django website in the world) or making much-needed updates to an existing Django project, you will have the tools and knowledge to do so.

Prerequisites

If youre brand-new to either Django or web development, this is not the book for you. The pace will be far too fast. While you could read along, copy all the code, and have a working website at the end, I instead recommend starting with my book Django for Beginners. It starts with the very basics and progressively introduces concepts via building five increasingly complex Django applications. After completing that book you will be ready for success with this book.

I have also written a book on transforming Django websites into web APIs called Django for APIs. In practice most Django developers work in teams with other developers and focus on back-end APIs, not full-stack web applications that require dedicated JavaScript front-ends. Reading Django for APIs is therefore helpful to your education as a Django developer, but not required before reading this book.

We will use Docker throughout most of this book but still rely, briefly, on having Python and Django installed locally. Git and the command line are also necessary components of the modern developers toolchain and will both be used extensively in this book as well.

Book Structure

Chapter 1 starts with setting up your local computer for development by using the command line, installing Python, configuring Git, and creating virtual environments. Chapter 2 is an introduction to Docker and explores how to Dockerize a traditional Django project. In Chapter 3 PostgreSQL is introduced, a production-ready database that we can run locally within our Docker environment and also deploy to production. Then Chapter 4 starts the main project in the book: an online Bookstore featuring a custom user model, search, image uploads, permissions, and a host of other goodies.

Chapter 5 focuses on building out a Pages app for a basic homepage along with robust testing which is included with every new feature on the site. In Chapter 6 a complete user registration flow is implemented from scratch using the built-in auth app for sign up, log in, and log out. Chapter 7 introduces proper static asset configuration for CSS, JavaScript, and images as well as the addition of Bootstrap for styling.

In Chapter 8 the focus shifts to advanced user registration, namely including email-only log in and social authentication via the third-party django-allauth package. Chapter 9 introduces environment variables, a key component of Twelve-Factor App development and a best practice widely used in the web development community. Rounding out the set up of our project, Chapter 10 focuses on email and adding a dedicated third-party provider.

The structure of the first half of the book is intentional. When it comes time to build your own Django projects, chances are you will be repeating many of the same steps from Chapters 3-9. After all, every new project needs proper configuration, user authentication, and environment variables. So treat these chapters as your detailed explanation and guide. The second half of the book focuses on specific features related to our Bookstore website.

Chapter 11 starts with building out the models, tests, and pages for our Bookstore via a Books app. There is also a discussion of URLs and switching from id to a slug to a UUID (Universally Unique IDentifier) in the URLs. Chapter 12 features the addition of reviews to our Bookstore and a discussion of foreign keys.

In Chapter 13 image-uploading is added and in Chapter 14 permissions are set across the site to lock it down. For any site but especially e-commerce, search is a vital component and Chapter 15 walks through building a form and increasingly complex search filters for the site.

In Chapter 16 the focus switches to performance optimizations including the addition of django-debug-toolbar to inspect queries and templates, database indexes, front-end assets, and multiple built-in caching options. Chapter 17 covers security in Django, both the built-in options as well as additional configurations that canand shouldbe added for a production environment. The final section, Chapter 18, is on deployment, the standard upgrades needed to migrate away from the Django web server, local static file handling, and configuring ALLOWED_HOSTS.

The Conclusion touches upon various next steps to take with the project and additional Django best practices.

Book Layout

There are many code examples in this book, which are formatted as follows:

Code
# This is Python codeprint("Hello, World!")

For brevity we will use three dots, ..., to denote existing code that remains unchanged in a longer code example. For example, in the function below, the previous content is unchanged and the

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Django for Professionals: Production websites with Python & Django 4.0»

Look at similar books to Django for Professionals: Production websites with Python & Django 4.0. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Django for Professionals: Production websites with Python & Django 4.0»

Discussion, reviews of the book Django for Professionals: Production websites with Python & Django 4.0 and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.