Code-sharing Update

When we decided to move SUMO to a new platform, one of the reasons we chose Django was code sharing and reuse—specifically that SUMO and AMO would be able to share code, meaning both teams would save time and see benefits.

So how is that going? Were we right in our assumption here? The code we’re sharing so far:

[MultiDB Router](
A Django DB router that supports reading from a pool of slave databases.
[Cache Machine](
A powerful caching library for Django that, in particular, provides automatic object caching and invalidation through the ORM.
An adapter for using [Jinja2]( templates with Django.
A test runner for Django using [Nose](
[Django Debug Cache Panel](
Adds a cache panel for [Django Debug Toolbar](
Tools we use testing in the Django/Jinja2/Nose setup.
A library for sanitizing and linkifying user HTML, based on [html5lib](
[Fixture Magic](
Django management commands for working with fixture data.
Additionally, we expect both teams will probably use the following, eventually:
A wrapper for [Hunspell](, using [PyHunspell]( to provide spelling suggestions for searches.
[Django Gearman](
Provides an easier interface from Django to the Python [Gearman]( bindings.
AMO’s JS and CSS minification
AMO has already solved the problem of JS and CSS minification with Django and Jinja2.
And it’s not a released library, but SUMO has also been able to directly reuse code from AMO to simplify pagination.

Overall, it seems like we’re doing really well on this! It’s great to see the projects not just sharing code, but packaging and publishing it on Github and PyPI. If any of the above is useful to you, go ahead and try it out! You can open issues with any of the packages on Github, or find us in #webdev in