Building Django 2.0 Web Applications
Create enterprise-grade, scalable Python web applications easily with Django 2.0
Tom Aratyn
BIRMINGHAM - MUMBAI
Building Django 2.0 Web Applications
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Amarabha Banerjee
Acquisition Editor: Noyonika Das
Content Development Editor: Gauri Pradhan
Technical Editor: Rutuja Vaze
Copy Editor: Dhanya Baburaj
Project Coordinator: Sheejal Shah
Proofreader: Safis Editing
Indexer: Aishwarya Gangawane
Graphics: Jason Monteiro
Production Coordinator: Shraddha Falebhai
First published: April 2018
Production reference: 1250418
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78728-621-4
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Tom Aratyn is a software developer and the founder of the Boulevard Platform. He has a decade of experience developing web apps for companies of all sizes (from boutiques to large start-ups, such as Snapchat). He loves solving problems using his server-side and client-side development skills and helping other developers grow.
I want to thank the many people who made this book possible. Thanks mom! Thanks to my friends who helped keep me grounded through it all. Particular thanks to my editor, Gauri Pradhan, who helped me so much over the many months. Thank you to the reviewers Andrei Kulakov and Dan Noble for helping improve the book. My thanks also to the many other folks on the Packt team, including Dhanya Baburaj, Rutuja Vaze, Noyonika Das, and everyone else!
About the reviewers
Andrei Kulakov lives in New York and has worked in the software industry for 10 years,
including many projects in genetic research, linguistics, hardware systems, healthcare and
machine learning. In his spare time, Andrei can often be found practicing hand-balancing in
one of the city parks.
Dan Noble is an accomplished full-stack web developer, data engineer, and author with more than 10 years of development experience. He enjoys working with a variety of programming languages and software frameworks, particularly Python, Elasticsearch, and JavaScript.
Dan currently works on geospatial web applications and data processing systems. He has been a user and an advocate of Django and Elasticsearch since 2009. He is the author of the book Monitoring Elasticsearch and a technical reviewer for The Elasticsearch Cookbook, Second Edition, by Alberto Paro, by Packt Publishing.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Preface
Who doesn't have an idea for the next great app or service they want to launch? However, most apps, services, and websites ultimately rely on a server being able to accept requests and then create, read, update, and delete records based on those requests. Django makes it easy to build and launch websites, services, and backends for your great idea. However, despite the history of being used at large-scale successful start-ups and enterprises, it can be difficult to gather all the resources necessary to actually take an idea from empty directory to running production server.
Over the course of three projects, Building Django Web Applications guides you from an empty directory to creating full-fledged apps to replicate the core functionality of some of the web's most popular web apps. In Part 1, you'll make your own online movie database. In Part 2, you'll make a website letting users ask and answer questions. In Part 3, you'll make a web app to manage mailing lists and send emails. All three projects culminate in your deploying the project to a server so that you can see your ideas come to life. Between starting each project and deploying it, we'll cover important practical concepts such as how to build APIs, secure your project, add search using Elasticsearch, use caching, and offload tasks to worker process to help your project scales.
Building Django Web Applications is for developers who already know some basics of Python, but want to take their skills to the next level. Basic understanding of HTML and CSS is also recommended, as these languages will be mentioned but are not the focus of the book.
After reading this book, you'll be familiar with everything it takes to launch an amazing web app using Django.
Next page