All articles by Vláďa Macek

Thumbnail image for Quick Django Class Based View Decorator

Quick Django Class Based View Decorator

The recommended way to add decorators such as login_required to class based views in Django is a bit verbose. Here’s a little metaclass-producing function you may find handy: def DecoratedDispatchMethod(actual_decorator): """ If you want to decorate the Class-based View with, …
Thumbnail image for Detecting File Moves & Renames with Rsync

Detecting File Moves & Renames with Rsync

Without patching, the rsync utility lacks support to detect when a file was renamed/moved across multiple directories inside the synced tree. There is a ––fuzzy option to save bandwidth by building upon similar files on the target side, but only …
Thumbnail image for Tracking Application Response Time with Nginx

Tracking Application Response Time with Nginx

Recently we noticed some intermittent slow downs with our Gondola sites and wanted to track down the source of the issue. Our sites are all Django projects served by Apache/mod_wsgi behind an Nginx frontend proxy. Nginx’s upstream module makes the …