What do you want to do in your resource, specify
def prepend_urls(self): return [ url(r"^(?P<resource_name>%s)/(?P<year>[\d]{4})/(?P<month>{1,2})/(?<day>[\d]{1,2})%s$" % (self._meta.resource_name, trailing_slash()), self.wrap_view('dispatch_list_with_date'), name="api_dispatch_list_with_date"), ]
which returns a url that points to the view (i called it dispatch_list_with_date), which does what you want.
For example, in the base_urls class, it points to a view called "dispatch_list", which is the main entry point for listing the resource, and you probably just want to sort the replica with your own filtering.
Your opinion may look pretty similar to this.
def dispatch_list_with_date(self, request, resource_name, year, month, day):
Indeed, I would just add filter to a regular list resource
GET /api/booking/?model_date_field=2011-01-01
You can get this by adding a filter attribute to your Meta class p>
But this is a personal preference.
source share