Example #1
0
 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
Example #2
0
 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
Example #3
0
 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']}
Example #4
0
 def detail_uri_kwargs(self, bundle_or_obj):
     return {
         'pk': get_obj(bundle_or_obj).case_id
     }
Example #5
0
 def detail_uri_kwargs(self, bundle_or_obj):
     return {'pk': get_obj(bundle_or_obj).other_model_id}
Example #6
0
 def detail_uri_kwargs(self, bundle_or_obj):
     return {
         'domain': get_obj(bundle_or_obj).domain,
         'pk': get_obj(bundle_or_obj)._id,
     }
Example #7
0
 def detail_uri_kwargs(self, bundle_or_obj):
     return {
         'pk': get_obj(bundle_or_obj).other_model_id
     }