Keeping track of Django project dependencies
Introducing django-package-monitor
tl;dr We’ve released django-package-monitor, a django app to make it easier to see which packages are out of date.
UPDATE: I messed up the setup.py dependencies in the original package, and the latest package depends on a source install of semantic_version
, so you will need to use the --process-dependency-links option
when installing . . .
Unexpected UUIDField upset
That moment when you realise your Universally Unique Identifier... isn't.
@stevejalim – YJ Tech Lead
We like UUIDs at YJ. One use of them we're particularly fond of is sticking specific yet meaning-free labels on objects, so we don't have to worry about exposing 'walkable' integer PKs or human-readable usernames or any of that awkward stuff.
As such, we've used our own . . .
Django, Whitenoise, and Heroku
tl;dr Heroku’s filesystem is ephemeral, so be careful when running the collectstatic command - it doesn’t necessarily do what you think it does..
Our current production asset delivery setup looks like this:
- Run grunt locally to generate static files
- Commit changes to repo
- Push to Heroku
- Run
collectstatic
to . . .
Migrating to Django 1.8: a journey logbook
Upgrading the framework your entire website relies on is a hard job, but someone has to do it. It was my turn here at YJ: migrating from Django 1.7.8 to 1.8.2.
Here's the list of things that broke on the way. Many of them are documented in the release notes, some of them are not: they're probably quite niche and specific to . . .
Securing a Django site at the perimeter
Sometimes contrib.auth just isn't enough
We run a number of working environments on Heroku - in addition to the live site we have dedicated UAT and DEV environments, a DEMO environment for the sales team, and since the recent Heroku pricing changes we're thinking about a spinning up a new environment per developer (so they can push feature branches to a public location for . . .
Keeping on top of Django's New Migrations
How to avoid being caught out by a missing Migration
For managing database schemas, as great and well-loved as South was, Django's new migrations framework is nicer, particularly thanks to better support for multi-developer, multi-branch projects like YJ.
However, the greater attention now paid to a model's changes has a potential gotcha, especially in a multi-dev environment: . . .
Simple request profiler for Django
From the "If you can't measure it, it didn't happen" department.
Premature optimisation is the root of all evil
The most important word in the above quote by Donald Knuth, who knows a thing about programming, is 'premature'. If premature optimisation really is the root of all evil, then how do you know when to begin? If you're anything like us, then "when people start . . .