Code for my Djangocon talk "Advanced Python through Django: Metaclasses"