PageView

Stories about Python, Django and Web Development

How to Create a Custom Django Middleware

In a nutshell, a Middleware is a regular Python class that hooks into Django’s request/response life cycle. Those classes holds pieces of code that are processed upon every request/response your Django application handles.

Read more



Django Tips #6 get_or_create

This is a convenience method for looking up an object, giving a set of parameters, creating one if necessary.

Read more



How to Use Django's Built-in Login System

Django comes with a lot of built-in resources for the most common use cases of a Web application. The registration app is a very good example and a good thing about it is that the features can be used out-of-the-box.

Read more



Date Template Filter

List of the most used Django date template filters to format date according to a given format, semantically ordered.

Read more



Django Tips #5 How to Merge QuerySets

This tip is particularly useful when you want to merge two or more querysets into a single queryset without losing the capabilities of performing filter, count, distinct, etc. operations.

Read more