A Brand New Blog

Powered by Hugo, GitHub and Travis CI

After the demise of Posterous in 2013, I moved my blog to Tumblr and mostly forgot about it. I didn’t feel like investing time and energy in yet another platform that could be acquired and shut down. Also, Tumblr never felt right for what I wanted to do. The past few years I have been playing with static site generators like Nikola. I liked their ideas and simplicity. A while ago I found the best static site generator I’d ever seen. [Read More]

ModelAdmin for a custom Django User model

Automatically generate a section for extra fields

Django offers a customized User model. One of the preferred approaches to a custom User is to extend AbstractUser. When doing this there is a nice trick to get all the fields you add to AbstractUser in a separate section in the admin interface. The method is to scan the parent for known fields, and add the fields that do not exist in the parent to a separate section. A full example is in the code below. [Read More]