Preface

Django, a backend framework with frontend tools built in, is designed to help developers build apps quickly and easily. It is designed to take much of the hassle out of web development so that developers can focus more on the features they are building and not the problems they are facing. Loaded with dozens of tools and combined with countless third-party Python packages, Django provides many features and components that work right out of the box.

The Django framework has been built with scalability and versatility in mind. As demand and traffic grow, so can your project. This allows developers to build onto an existing system easily. Security is also something that Django takes seriously by building many different security measures directly into its framework. This has been done to help developers avoid common mistakes when it comes to security. It even has its own user authentication system to help manage your users.

In this book, we will learn about the fundamental components of the Django framework and how it relates to web development. From small websites to large, enterprise-level applications, this book will dive in and discuss the essential components for building a website or app of any size.

Who this book is for

This book focuses on full-stack enterprise-level application development. If you are looking to build a web app, API, or website or maintain an existing project, this book is for you. The book assumes intermediate-level knowledge of the Python programming language and it has been carefully fine-tuned for those who are new to the Django framework. Whether you are new to web development or have years of experience working with other technologies, this book is for you.

What this book covers

Chapter 1, Undertaking a Colossal Project, gives you an understanding of how to prepare for a large project.

Chapter 2, Project Configuration, covers virtual environments, hosting, and deployment.

Chapter 3, Models, Relations, and Inheritance, covers database table structures.

Chapter 4, URLs, Views, and Templates, covers rendering HTML with Django.

Chapter 5, Django Forms, covers rendering HTML forms with Django.

Chapter 6, Exploring the Django Admin Site, looks at Django's built-in administration site.

Chapter 7, Working with Messages, Email Notifications, and PDF Reports, covers using Django to send emails and create documents.

Chapter 8, Working with the Django REST Framework, covers building APIs with Django.

Chapter 9, Django Testing, covers writing test scripts with Django.

Chapter 10, Database Management, covers optimizing database queries.

To get the most out of this book

You will need the latest version of Python. All code examples in this book have been tested using Python version 3.9 on Windows 11 using Django 4.0. However, they should work with future version releases as well.

Each chapter will provide additional installation and configuration instructions as the book progresses, such as in Chapter 2, Project Configuration, when we install an optional integrated development environment software suite, or in Chapter 9, Django Testing, when we install a productivity and testing tool.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book's GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Becoming-an-Enterprise-Django-Developer. If there's an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

The code provided in this book's GitHub repository includes every example from every chapter. Much of the code is commented out except for the first exercise found in each chapter. If you are using the code provided with this book, it is intended to comment and uncomment code as you progress throughout the book. If you jump ahead, you may need to uncomment the necessary code that was skipped in order for the project to work. Each chapter has been organized into its own chapter app within the project as a whole. Project apps will be introduced and discussed in Chapter 2, Project Configuration.

Code in Action

The Code in Action videos for this book can be viewed at https://bit.ly/3HQDP9Z.

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781801073639_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Be sure to also include this app in your INSTALLED_APPS variable found in the settings.py file."

A block of code is set as follows:

# /becoming_a_django_entdev/chapter_5/forms.py
from django.forms 
import Form
class ContactForm(Form):
    pass

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

# /becoming_a_django_entdev/chapter_5/forms.py
from django.forms 
import Form, ModelForm
class VehicleForm(ModelForm):
    pass

Any command-line input or output is written as follows:

RuntimeError: Conflicting 'vehicle' models in application 'chapter_3':

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: " We can see the chapter_3_engine and chapter_3_practice_engine tables in the preceding screenshot."

Tips or Important Notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Author: If you would like to get in touch with the author directly, you may find and message him on LinkedIn here https://www.linkedin.com/in/mikedinder/.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you've read Becoming an Enterprise Django Developer, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.18.221.18