Mental Models for Class Based Views

Django’s class-based views are powerful and customizable, but unless you have a solid mental model of how they work, they’re also confusing and tricky to master. It’s easy to use class-based views without a deep understanding of their inner workings, which leads to Googling for which method or attribute to modify rather than confident usage […]

Python and Django Logging in Plain English

If you’ve ever written a program and printed out a value to see what’s going on during execution, then you understand at some level why logging is so valuable. Knowing what’s happening in your code at a point in time is enormously useful from both technical and business perspectives. This knowledge lets developers and product […]

How a request becomes a response: Diving deeper into WSGI

In the last post we looked at how a request gets from the internet to the front door of Django, the wsgi.py file. WSGI, which is short for Web Server Gateway Interface, is the topic of today’s post, as it lays the groundwork for understanding how Django handles requests. We’ll cover the key components of […]

Deconstructing Requests: How Http Requests get from the Internet to Django

One of the best parts of using a modern web framework is that you don’t need to understand much about a request before it hits one of your designated routes. You get to sit down, build a view (or controller if you’re using an MVC framework), and immediately have access to a Request object. This […]