Writing a custom field in Django March 21, 2010 15:44 / 1 comments

Reusable code is one of the most talked-about silver bullets in our toolkit. Django has a huge ecosystem of reusable apps, but not nearly so many reusable fields. Apps and fields generally solve different problems, though, and while an app can be retemplated or modified to fit your use case, a field is often times so specialized or exact in its purpose that either you need it or you don't. In this entry I'll discuss a great use-case for a field we had at work building out live March Madness coverage, and a popular field that is also an app.