Django orm enhancements

This allows following foreign key relationships.