django-based web service for sorting complex data types