Contribute Media
A thank you to everyone who makes this possible: Read More

Hunting for Treasure in Django

Summary

Hunting for Treasure in Django by Sebastian Vetter

Django is a comprehensive web framework that provides well-defined concepts such as request, response, middleware and view that make our lives as perfectionists with deadlines much easier. What many of us are not aware of is the rich collection of utilities and tooling around these concepts that are part of the famework. Decorators, helper functions and context managers that are used internally but can make life as a developer much easier as well.

Introduction (~ 2 mins)

A little bit about me. Why am I talking about this? Django's Hidden Treasures (~ 4 mins)

The reason for this talks. What do I consider hidden treasures? Which Django modules are interesting? Are they documented and were do I find it? Examples of hidden treasures:

A quick introduction of the module. What's a possible use case for it? How does it solve it? Where is it used in the Django?

cached_property (~ 2 mins)

import_string (~ 2 mins)

lazy, LazyObject and lazy_property (~ 3 mins)

decorators module (~ 4 mins)

classonlymethod decorator_from_middleware update_wrapper and wraps (technically not Django) django.views (~ 4 mins)

debug.cleanse_setting decorators.debug.sensitive_parameters decorators.debug.sensitive_post_parameteĀ­rs Wrapping up (~ 2 mins)

Django documentation links. Some suggestions for further investigation.

Details

Improve this page