How can you take advantage of the Django framework to integrate complex client-side interactions and real-time features into your web applications? Through a series of rapid application development projects, this hands-on book shows experienced Django developers how to include REST APIs, WebSockets, and client-side MVC frameworks such as Backbone.js into new or existing projects.

Learn how to make the most of Django’s decoupled design by choosing the components you need to build the lightweight applications you want. Once you finish this book, you’ll know how to build single-page applications that respond to interactions in real time. If you’re familiar with Python and JavaScript, you’re good to go.

Learn a lightweight approach for starting a new Django project

Break reusable applications into smaller services that communicate with one another

Create a static, rapid prototyping site as a scaffold for websites and applications

Build a REST API with django-rest-framework

Learn how to use Django with the Backbone.js MVC framework

Create a single-page web application on top of your REST API

Integrate real-time features with WebSockets and the Tornado networking library

Julia Elman

Julia Elman is a designer, developer, and tech education advocate based in North Carolina. She has been working on her brand of web skills since 2002. Her creative nature drove her to find work in 2007 at Hallmark Cards, Inc., where she worked on projects such as the Product (RED) campaign and Hallmark’s site redesign. From there, she took a dive into Django as a junior designer/developer at World Online in Lawrence, Kansas. In early 2013, she helped start a local chapter of Girl Develop It and empowered over 600 members to learn computer programming. She also helped organize the 2013 Teen Tech Camp, where 20 local teens learned Python programming in a one-day event.

Mark Lavin

Mark Lavin is a lead Python/Django developer at Caktus Consulting Group in Carrboro, North Carolina. He also runs a small homebrewing website, written in Django, called brewedbyus.com. He came to Python web development after a few years pricing derivatives on Wall Street. Mark maintains anumber of open source projects primarily related to Django development and frequently contributes back to projects used by Caktus. When he isn’t programming, Mark enjoys spending time with his wife and daughter, brewing beer, and running.

The animals on the cover of Lightweight Django are vervain hummingbirds (Mellisuga minima). Native to Jamaica, Haiti, and the Dominican Republic, these non-migratory hummingbirds are common, favoring subtropical and tropical lowland forests.While lacking the bright, jewellike plumage of other hummingbird species, they are notable for being the second smallest bird in the world, after the bee hummingbird of Cuba. The vervain measures roughly 2.4 inches in length, including its bill, and weighs between .07 and .08 ounces. These birds primarily feed on nectar from flowers, using their extendible tongues to lap up the nectar at a rate of 13 times per second.Hummingbirds are solitary creatures, coming together only to breed. The male disperses immediately after copulation, leaving the female to build the nest and raise the young. These eggs are the smallest laid by any bird, at just a third of an inch in length, weighing .375 grams on average. Nests are barely the size of half a walnut shell.Despite its diminutiveness, the vervain produces a loud, piercing song—often the only indication of its presence, as this bird can be difficult to spot due to its size. Highly vocal, the birds turn their heads from side to side as they sing.

The examples that you build throughout the different chapters are not just "toy" projects, some of these I could actually use "as is" for daily tasks, like the static website generator, or the scrum board.

Great coverage of django-rest-framework.

I'd have loved to see coverage of deploying the apps, perhaps to Heroku, or even containerizing them with Docker.

I have started with Python just a few month ago and as a web developer I tried to figure out, what Python can do for me. After I found Django, I had been looking literature and tutorials quite a lot. This book fit best, as it explains the fundamental structure of projects and apps in detail and grows the example throughout the chapters. Especially the REST chapter was very helpful.

The book is not just a good tutorial that can easily be follewed hands on the keyboard but also a rich source of personal experience.

I would first like to say that I do not take it lightly when rating anything with one star.

However, this book deserves it, and I'll tell you why.

I'm an actual Python developer, not an academic, computer scientist or tinkerer. With the lack of Django material out there, I positively lit up with joy when I saw this on the market.

While I had already done RESTful services with AngularJs, I really wanted to see the Tornado / Websockets integration!

The first mistake is they wrote this book in Python 3 with no consideration for Python 2 backwards compatibility. Normally when you see someone using Python 3, it means they either don't have to answer to anyone about package compatibility, legacy libraries, app compatibility and just generally everything that a real day job developer would have to answer for.

While I see it as a warning sign when something is done in Python 3, I am experienced enough to be able to translate it back.

So as I worked though this book, it seemed more like a display of impractical, high-minded, Python 3 design patterns combined with Django.. and not actual applications that anyone would ever have to deal with, make or find useful.

I took absolutely nothing away from this book except a little better Python 3 knowledge, which is worthless if you want good library compatibility or use Python at your day job.

I suppose the most useful application of this book is as a door stop or coaster.

I bought this book at the suggestion of a fellow PythonKC member, and I must say I'm very impressed. By "deconstructing" a Django application to the absolute minimum requirements and building back up from that base, the authors have shown me that many things I thought I knew about Django weren't true, and I'm glad to have been wrong.

Begins with a refreshing and insightful introduction to Django.Follows with code quality and practices which range from average to mostly awful. In chapter 3 alone, don't write content back into the code base, don't lump everything into views, don't import django.test.client into the implementation.This is very unfortunate because the ideas and goals of the book are very good, just poorly executed.

If you are a python hacker and you are embracing the web via APIs and microservices (and you should be), this book is your new best friend. This book should have a wide appeal-- from students and novices who want to start simply, to experts who want to restore sanity to complex systems.

It starts by showing how pythonic django is by building the smallest functional web service possible. It does a nice job of showing that django compares well to bottle.py and flask for simplicity. Django's strength lays in it's ability to scale to complex requirements, without outgrowing its applicability. Latter in the book, the marvelous django-rest-framework is used to build restful APIs with authentication and optional admin tools.

I'm greatly enjoying the book so far, and looking forward to the rest of the material as it's added.