Debugging Django Management Commands with strace

This past week I ran into an issue where a django management command running on a cron began to hang.   I began to rollback changes to the environment, downgrading python versions, downgrading postgresql versions and even rebuilding the application in another region on Digial Ocean.  None of this seemed to work.  My initial hypothisis was that there was a bug in the managem…

Django Constraints

As of Django 2.2, you can add database constraints to your models.  I find database constraints extremely valuable and one of those few features that Django really needed.

This blog post is more of a quick reference for myself when adding constraints to my Django models

Django has support for both CheckConstraints and UniqueConstraints.&n…

Where Have I Been?

It's been a while since I've posted something here. My last post was in June and then, I kind of disappeared. The second half of this year has been exciting and busy. The reason I've been dormant is because I've had a change in priority during this time. I started this blog to try and get myself into a writing habit. My original goal was to post something once a month which wou…

Installing Let's Encrypt with Ansible

I started using Let's Encrypt during beta and feel in love with it. It's made installing, setting up and maintaining SSL certificates so easy. It's also extremely affordable (given that it is free) for everyone. I truely believe every website should be running over HTTPS no matter what and Let's Encrypt gives you no more excuses. In this article I'm going to tell you how I&…

Publishing to Elasticsearch using Django and Postgres DictCursor

One of the projects I've been working on relies heavily on elasticsearch and the current dataset is a few million records. I'm currently indexing about a million records and expect to index the entire data set in the near future. I originally took a simple approach to indexing the data which took about an hour and a half to fully index. The data orginates from an external source and I&…