[Answer]-How does the get_list tastypie function work?

1👍

Unless your ItemResource accepts filters (more here), you have to copy-paste all the stuff from here, lines #1306 – #1313.

The point is that get_list results get filtered only by obj_get_list (initial filters), and apply_filters (request-specific filters) so you have to skip directly to the serialization part (you can include the pagination part, if needed).

This is one of the cases where django-restframework appears to be better than django-tastypie – it refactores serialization out into a separate class, avoiding the code duplication.

Leave a comment