With Ubuntu 14.04 (Trusty) now a year away from end-of-life, we’ve been planning and performing upgrades for the soon-to-be legacy OS. The biggest change is the move from Upstart to Systemd for managing services. It’s trivial to convert a service …
I’ll be the first to admit that I was skeptical about Systemd and its companion log aggregator Journald, but after working with if for a few months, I’ve seen the light (or drunk the Kool Aid… not sure).
Typically I …
Every Django project starts with a manage.py file in its root. It’s a convenience script that allows you to run administrative tasks like Django’s included django-admin.
In our last post, we discussed the merits of including a setup.py file in …
A client recently asked me why all the Django projects we create have a setup.py in the root of the project. Lots of projects get by just fine without one, so why do I use it? The explanation turned out …
Good logging is critical to debugging and troubleshooting problems. Not only is it helpful in local development, but in production it’s indispensable. When reviewing logs for an issue, it’s rare to hear somebody say, “We have too much logging in …
One of Django’s nice “batteries included” features is the ability to send emails when an error is encountered. This is a great feature for small sites where minor problems would otherwise go unnoticed.
Once your site start getting lots of …
One of the things I love about the DevOps movement is how (when done right) it empowers developers to work with infrastructure in a safe and controlled manner. Once you’ve nailed down deployments to a static set of servers (production, …
In this long overdue follow-up to Part 1, I’ll be discussing the infrastructure issues associated with creating and serving image thumbnails at scale. The naive solution to generating thumbnails is to declare the image sizes you want in your templates …
One of my favorite patterns in Django is the combination of “fat” models and cached_property from django.utils.functional.
Fat models are a general MVC concept which encourages pushing logic into methods on your Model layer rather than the Controller (“view” in …
Linting SCSS with sass-lint
Complex projects always require multiple developers and design heavy web sites are no exception. Sass/SCSS is still our language of choice when writing CSS, both for its wide support and flexibility. The latter can be a …