Tastypie is designed to help implement the REST API and, thus, by default only supports URLs that conform to REST methods. Namely, each URL must contain the name of the resource (“recipe” or “spice”) and optionally an identifier for this resource (“ID”). Anything outside of this violates the REST rules, and if you do not implement the REST API, you may need to reconsider whether you should use Tastypie.
In this way, Tastypie provides a ton of hooks for customizing things. For custom URLs, you want to define an override_urls method to map specific URLs to custom views and do preprocessing before sending them to regular dispatchers.
If possible, I would recommend simply using standard REST methods and breaking things up as separate recipe and spice resources. If you need to filter recipes based on the spices that are in them, the “spices” should be passed as a GET parameter, not part of the base URL. Hope this helps.
Spike source share