Easily center a marker on a complex line in GeoDjango

GeoDjango comes with a native way of retrieving a simple line's geographic center, but will put us off in the presence of complex MultiLineStrings. Let's help ourselves to more advanced GeoDjango ORM tools for a flexible approximation of a marker placement.

Unit-testing the command line input in Python

As essential a practice as unit testing is in everyday development, it can be puzzling in the presence of prompt inputs. And the matter gets even hairier for passwords. Let's see how to effectively handle every such case easily.

Pretty and XSS-safe JSON rendering in the Django admin

A plethora of modules is available out there aiming to pretty-format a read-only JSON field in the Django admin. But do you really need to carry the burden of the extra features coming with such modules?

Get yourself a better Django proxy experience

Ah, Django proxy models and the power they hold! Yet, the implementation aftermath can highlight a number of unwanted side-effects. Here’s a couple of tips when working with Django proxies that will make end-users grateful and developers sigh in relief.

Enhancing the Django “redirects” app

Rather hidden away in Django’s meanders resides the “redirects” app. Let’s take it for a spin and find out how to extend it even further to accommodate features content managers and marketers use and love.

A Django admin list filter for PostgreSQL ArrayFields

Django’s ArrayField is a nifty resource straight out of the Field API, helping you avoid polluting your database with tables that you already know won’t be subject to advanced aggregations. Yet, there is no such thing as a native helper for a trivial implementation of an admin list filter feeding from an ArrayField. Let’s fill the gap!

Experimenting with code obfuscation in Electron.js

As vulnerable as the current client-side technologies are, can we do anything to keep our Electron app away from trivial reverse engineering attempts?