Django for Beginners
Django for Beginners (Book)
Minimum price
Suggested price
Django for Beginners

Last updated on 2019-04-25

About the Book

A step-by-step guide to building web applications with Python and Django 2.2.

Create, test, and deploy 5 progressively more complex websites including a Message Board app, a Blog app with user accounts, and a robust Newspaper app with reader comments and a complete user registration flow.

Along the way you'll learn core Django features and best practices around models, views, templates, urls, custom user models, permissions, authorizations, user registration, testing, and deployment.

Topics covered include:

  • Django 2.2 and Python 3.7
  • Pipenv for virtual environments
  • Templates/URLs
  • Class-based views
  • User authentication
  • Custom user model
  • Permissions and authorizations
  • Deployment
  • Testing

About the Author

William S. Vincent
William S. Vincent

William S. Vincent is the author of Django for Beginners and REST APIs with Django. Previously an early employee at Quizlet, he has used Django at multiple early-stage startups in the Boston area and taught computer science at Williams College. He writes regularly about Python and Django at

Bundles that include this book

Django for Beginners
Django for APIs
Suggested Price
Bundle Price

Table of Contents

  • Introduction
    • Why Django
    • Why this book
    • Book Structure
    • Book layout
    • Conclusion
  • Chapter 1: Initial Set Up
    • The Command Line
    • Install Python 3 on Mac
    • Install Python 3 on Windows
    • Install Python 3 on Linux
    • Virtual Environments
    • Install Django
    • Install Git
    • Text Editors
    • Conclusion
  • Chapter 2: Hello World app
    • Initial Set Up
    • Create an app
    • Views and URLConfs
    • Hello, world!
    • Git
    • GitHub
    • SSH Keys
    • Conclusion
  • Chapter 3: Pages app
    • Initial Set Up
    • Templates
    • Class-Based Views
    • URLs
    • Add an About Page
    • Extending Templates
    • Tests
    • Git and GitHub
    • Local vs Production
    • Heroku
    • Additional Files
    • Deploy
    • Conclusion
  • Chapter 4: Message Board app
    • Initial Set Up
    • Create a database model
    • Activating models
    • Django Admin
    • Views/Templates/URLs
    • Adding new posts
    • Tests
    • GitHub
    • Heroku configuration
    • Heroku deployment
    • Conclusion
  • Chapter 5: Blog app
    • Initial Set Up
    • Database Models
    • Admin
    • URLs
    • Views
    • Templates
    • Static files
    • Individual blog pages
    • Tests
    • Git
    • Conclusion
  • Chapter 6: Forms
    • Forms
    • Update Form
    • Delete View
    • Tests
    • Conclusion
  • Chapter 7: User Accounts
    • Log in
    • Updated homepage
    • Log out link
    • Sign up
    • GitHub
    • Heroku config
    • Heroku deployment
    • Conclusion
  • Chapter 8: Custom User Model
    • Set Up
    • Custom User Model
    • Forms
    • Superuser
    • Conclusion
  • Chapter 9: User Authentication
    • Templates
    • URLs
    • Admin
    • Conclusion
  • Chapter 10: Bootstrap
    • Pages app
    • Tests
    • Bootstrap
    • Sign Up Form
    • Next Steps
  • Chapter 11: Password Change and Reset
    • Password Change
    • Customizing password change
    • Password reset
    • Custom Templates
    • Conclusion
  • Chapter 12: Email
    • SendGrid
    • Custom emails
    • Conclusion
  • Chapter 13: Newspaper app
    • Articles app
    • URLs and Views
    • Edit/Delete
    • Create page
    • Conclusion
  • Chapter 14: Permissions and Authorization
    • Improved CreateView
    • Authorizations
    • Mixins
    • LoginRequiredMixin
    • UpdateView and DeleteView
    • Conclusion
  • Chapter 15: Comments
    • Model
    • Admin
    • Template
    • Conclusion
  • Conclusion
    • Full-Stack Django
    • Open-Source Resources
    • Newsletter
    • Django Resources
    • Python Books
    • Blogs to Follow
    • Feedback

Other books by this author

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. Free App. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets), MOBI (for Kindle) and in the free Leanpub App (for Mac, Windows, iOS and Android). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub