Building Django 2.0 Web Applications

Go from the initial idea to a production-deployed web app using Django 2.0.
Preview in Mapt

Building Django 2.0 Web Applications

Tom Aratyn
New Release!

Go from the initial idea to a production-deployed web app using Django 2.0.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Building Django 2.0 Web Applications Book Cover
Building Django 2.0 Web Applications
$ 35.99
$ 25.20
Godot Game Engine Projects Book Cover
Godot Game Engine Projects
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $36.98
Add to Cart

Book Details

ISBN 139781787286214
Paperback406 pages

Book Description

This project-based guide will give you a sound understanding of Django 2.0 through three full-featured applications. It starts off by building a basic IMDB clone and adding users who can register, vote on their favorite movies, and upload associated pictures. You will learn how to use the votes that your users have cast to build a list of the top 10 movies. This book will also take you through deploying your app into a production environment using Docker containers hosted on the server in Amazon's Electric Computing Cloud (EC2).

Next, you're going to build a Stack Overflow clone wherein registered users can ask and answer questions. You will learn how to enable a user asking a question to accept answers and mark them as useful. You will also learn how to add search functionality to help users find questions by using ElasticSearch. You'll discover ways to apply the principles of 12 factor apps while deploying Django on the most popular web server, Apache, with mod_wsgi. Lastly, you'll build a clone of MailChimp so users can send and create emails, and deploy it using AWS.

Get set to take your basic Python skills to the next level with this comprehensive guide!

Table of Contents

Chapter 1: Starting MyMDB
Starting My Movie Database (MyMDB)
The core app
Individual movie pages
Pagination and linking movie list to movie details
Adding Person and model relationships
Summary
Chapter 2: Adding Users to MyMDB
Creating the user app
Letting users vote on movies
Calculating Movie score
Summary
Chapter 3: Posters, Headshots, and Security
Uploading files to our app
OWASP Top 10
Summary
Chapter 4: Caching in on the Top 10
Creating a top 10 movies list
Optimizing Django projects
Using Django's cache API
Summary
Chapter 5: Deploying with Docker
Organizing configuration for production and development
Creating the MyMDB Dockerfile
Creating a database container
Storing uploaded files on AWS S3
Using Docker Compose
Sharing your container via a container registry
Launching containers on a Linux server in the cloud
Summary
Chapter 6: Starting Answerly
Creating the Answerly Django project
Creating the Answerly models
Adding a base template
Configuring static files
Letting users post questions
Creating QuestionDetailView
Creating the CreateAnswerView
Creating UpdateAnswerAcceptanceView
Creating the daily questions page
Getting today’s question list
Creating the user app
Updating base.html navigation
Running the development server
Summary
Chapter 7: Searching for Questions with Elasticsearch
Starting with Elasticsearch
Loading existing Questions into Elasticsearch
Creating a search view
Adding Questions into Elasticsearch on save()
Summary
Chapter 8: Testing Answerly
Installing Coverage.py
Measuring code coverage
Creating a unit test for Question.save()
Creating models for tests with Factory Boy
Creating a unit test for a view
Creating a view integration test
Creating a live server integration test
Summary
Chapter 9: Deploying Answerly
Organizing configuration for production and development
Preparing our server
Deploying Answerly with Apache
Deploying Django projects as twelve-factor apps
Summary
Chapter 10: Starting Mail Ape
Creating the Mail Ape project
Creating the mailinglist models
Using database migrations
MailingList forms
Creating MailingList views and templates
Creating the user app
Running Mail Ape locally
Summary
Chapter 11: The Task of Sending Emails
Creating common resources for emails
Sending confirmation emails
Using Celery to send emails
Sending messages to subscribers
Testing code that uses Celery tasks
Summary
Chapter 12: Building an API
Starting with the Django REST framework
Creating the Django REST Framework Serializers
API permissions
Creating our API views
Running our API
Testing your API
Summary
Chapter 13: Deploying Mail Ape
Separating development and production
Creating an infrastructure stack in AWS
Building an Amazon Machine Image with Packer
Deploying a scalable self-healing web app on AWS
Scaling up and down with update-stack
Summary

What You Will Learn

  • Build new projects from scratch using Django 2.0
  • Provide full-text searching using ElasticSearch and Django 2.0
  • Learn Django 2.0 security best practices and how they're applied
  • Deploy a full Django 2.0 app almost anywhere with mod_wsgi
  • Deploy a full Django 2.0 app to AWS's PaaS Elastic Beanstalk
  • Deploy a full Django 2.0 app with Docker
  • Deploy a full Django 2.0 app with NGINX and uWSGI

Authors

Table of Contents

Chapter 1: Starting MyMDB
Starting My Movie Database (MyMDB)
The core app
Individual movie pages
Pagination and linking movie list to movie details
Adding Person and model relationships
Summary
Chapter 2: Adding Users to MyMDB
Creating the user app
Letting users vote on movies
Calculating Movie score
Summary
Chapter 3: Posters, Headshots, and Security
Uploading files to our app
OWASP Top 10
Summary
Chapter 4: Caching in on the Top 10
Creating a top 10 movies list
Optimizing Django projects
Using Django's cache API
Summary
Chapter 5: Deploying with Docker
Organizing configuration for production and development
Creating the MyMDB Dockerfile
Creating a database container
Storing uploaded files on AWS S3
Using Docker Compose
Sharing your container via a container registry
Launching containers on a Linux server in the cloud
Summary
Chapter 6: Starting Answerly
Creating the Answerly Django project
Creating the Answerly models
Adding a base template
Configuring static files
Letting users post questions
Creating QuestionDetailView
Creating the CreateAnswerView
Creating UpdateAnswerAcceptanceView
Creating the daily questions page
Getting today’s question list
Creating the user app
Updating base.html navigation
Running the development server
Summary
Chapter 7: Searching for Questions with Elasticsearch
Starting with Elasticsearch
Loading existing Questions into Elasticsearch
Creating a search view
Adding Questions into Elasticsearch on save()
Summary
Chapter 8: Testing Answerly
Installing Coverage.py
Measuring code coverage
Creating a unit test for Question.save()
Creating models for tests with Factory Boy
Creating a unit test for a view
Creating a view integration test
Creating a live server integration test
Summary
Chapter 9: Deploying Answerly
Organizing configuration for production and development
Preparing our server
Deploying Answerly with Apache
Deploying Django projects as twelve-factor apps
Summary
Chapter 10: Starting Mail Ape
Creating the Mail Ape project
Creating the mailinglist models
Using database migrations
MailingList forms
Creating MailingList views and templates
Creating the user app
Running Mail Ape locally
Summary
Chapter 11: The Task of Sending Emails
Creating common resources for emails
Sending confirmation emails
Using Celery to send emails
Sending messages to subscribers
Testing code that uses Celery tasks
Summary
Chapter 12: Building an API
Starting with the Django REST framework
Creating the Django REST Framework Serializers
API permissions
Creating our API views
Running our API
Testing your API
Summary
Chapter 13: Deploying Mail Ape
Separating development and production
Creating an infrastructure stack in AWS
Building an Amazon Machine Image with Packer
Deploying a scalable self-healing web app on AWS
Scaling up and down with update-stack
Summary

Book Details

ISBN 139781787286214
Paperback406 pages
Read More

Read More Reviews

Recommended for You

Godot Game Engine Projects Book Cover
Godot Game Engine Projects
$ 35.99
$ 25.20
Python Interviews Book Cover
Python Interviews
$ 27.99
$ 19.60
Python GUI programming with Tkinter Book Cover
Python GUI programming with Tkinter
$ 35.99
$ 25.20
Django 2 by Example Book Cover
Django 2 by Example
$ 35.99
$ 25.20
Microservices with Clojure Book Cover
Microservices with Clojure
$ 35.99
$ 25.20
ECMAScript Cookbook Book Cover
ECMAScript Cookbook
$ 31.99
$ 22.40