Friday, May 7, 2021

A new maintainer for django-allauth-2fa

I’m excited to announce the django-allauth-2fa project has a new maintainer! It can now be found under the valohai organization on GitHub, who have already contributed quite a bit to the package.

This project lets you easily add two-factor authentication to a Django project using django-allauth.

As a bit …

read more →
Friday, February 26, 2021

django-querysetsequence 0.14 released!

django-querysetsequence 0.14 has been released with support for Django 3.2 (and Python 3.9). django-querysetsequence is a Django package for treating multiple QuerySet instances as a single QuerySet, this can be useful for treating similar models as a single model. The QuerySetSequence class supports much of the API …

read more →
Tuesday, October 27, 2020

django-render-block 0.8 (and 0.8.1) released!

A couple of weeks ago I released version 0.8 of django-render-block, this was followed up with a 0.8.1 to fix a regression.

django-render-block is a small library that allows you render a specific block from a Django (or Jinja) template, this is frequently used for emails when …

read more →
Monday, January 27, 2020

Squashing Django Migrations

The Django migration system is great for modifying your database schema after a database is live. If you’re like me, you quickly end up with many 10s or 100s of migrations. There’s nothing inherently wrong with this, but there’s a few cases where it gets tiresome to …

read more →
Thursday, January 23, 2020

Cleanly removing a Django app (with models)

While pruning features from our product it was necessary to fully remove some Django apps that had models in them. If the code is just removed than the tables (and some other references) will be left in the database.

After doing this a few times for work I came up …

read more →
Thursday, January 23, 2020

Using MySQL’s LOAD DATA with Django

While attempting to improve performance of bulk inserting data into MySQL database my coworker came across the LOAD DATA SQL statement. It allows you to read data from a text file (in a comma separated variable-like format) and quickly insert it into a table. There’s two variations of it …

read more →
Thursday, April 6, 2017

Adding Two-Factor Authentication to Django (with django-allauth)” Lightning Talk

A bit late on this article, but better late than never! Back on October 27th, 2016 I gave a talk at Django Boston entitled “Adding Two-Factor Authentication to Django (with django-allauth)”. It was a ~20 minute talk on integrating the django-allauth-2fa package into a Django project. The package (which I …

read more →
Thursday, February 4, 2016

Combining Disparate QuerySets in Django

Note: This was originally posted on the Strongarm Blog.

While refactoring strongarm.io we ran into a problem: we had different database tables that we needed to query over as if they were a single database table. We use Django as an ORM and needed to stay within the ORM …

read more →