def get_resource_uri(self, bundle_or_obj=None, url_name='api_dispatch_list'): uri = super(ConfigurableReportDataResource, self).get_resource_uri(bundle_or_obj, url_name) if bundle_or_obj is not None and uri: get_params = get_obj(bundle_or_obj).get_params.copy() if "offset" not in get_params: get_params["offset"] = 0 if "limit" not in get_params: get_params["limit"] = self.LIMIT_DEFAULT uri += "?{}".format(get_params.urlencode()) return uri
def detail_uri_kwargs(self, bundle_or_obj): # Not sure why this is required but the feed 500s without it return {'pk': get_obj(bundle_or_obj)['_id']}
def detail_uri_kwargs(self, bundle_or_obj): return { 'pk': get_obj(bundle_or_obj).case_id }
def detail_uri_kwargs(self, bundle_or_obj): return {'pk': get_obj(bundle_or_obj).other_model_id}
def detail_uri_kwargs(self, bundle_or_obj): return { 'domain': get_obj(bundle_or_obj).domain, 'pk': get_obj(bundle_or_obj)._id, }
def detail_uri_kwargs(self, bundle_or_obj): return { 'pk': get_obj(bundle_or_obj).other_model_id }