Learning Django through the book Django by example, my review
This book plans to teach you Django by creating four projects from scratch. Django by Example starts by creating a blog, then a social network, an online store and finally a learning platform. Each project is developed practically from scratch and uses some libraries to complement the functions.
If you don't know the advantages and disadvantages that Django offers, visit my post where I explain some advantages and disadvantages of the Django web development framework
The first project proposed by Django by Example is the classic example of a simple blog, with authors and posts. The author designs a blog and they teach you the basics of Django, models, views, urls and templates, you know, the basics. As an aspect to highlight is pagination of the models and how to integrate it into the template system using Jquery. In a few words we are in front of the basic Django tutorial of the documentation but with books instead of surveys.
The next project is a social network similar to Pinterest, where you save images from other websites to share them later using Jquery, this social network has a user tracking system (similar to Facebook, in case you want to compete with it). For this chapter the author delves into forms, model-based forms, handling email sending, creating custom labels, filters for the template system, and using Django's built-in authentication and session system. More advanced topics include creating a sitemap, advanced search using Solr and Haystack, redis and Django signals.
Programming an online store
The third project consists of an online store that implements a payment system using Paypal, a product catalog, user accounts and a shopping cart. For the online store we will review the content of the previous chapters and also explain the context processors, the use and configuration of celery (using RabbitMQ as a broker) for asynchronous tasks, the Paypal API, the export of spreadsheet files, the dynamic generation of pdf for orders using weasyprint and the translation between languages using the integrated Django system. Redis will also be used to create a fairly simple but effective product recommendation engine, don't expect to take the throne away from amazon or google.
For the last project, an e-learning platform will be created using a CMS. This chapter touches on slightly more advanced Django topics such as the use of abstract models, proxies and multi-table inheritance and custom fields for models. The author will explain in the later chapters generic views and packages such as django-braces, which further reduce the amount of code to write. It's great that the author also implements a cache system using memcached. And to finalize the project, Django Rest Framework will be used to make the contents of the website available to the public.
After this last project Django by example ends. But, as a bonus it offers an extra chapter, where you will see the use of middleware and the deployment of the application using nginx and uwsgi.
This book offers a pragmatic approach, you learn as you create projects, step by step, a much more enjoyable approach than reading the documentation. Also this approach will probably be more similar to what a developer faces when he wants to launch a website.
Edit: I am seeing that there is a new version of the book and it includes Django Channels for handling websockets, however it still implements Jquery for its examples.
Read my other Django book reviews here: