예제 #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
예제 #2
0
파일: v0_5.py 프로젝트: kkrampa/commcare-hq
 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
예제 #3
0
파일: v0_5.py 프로젝트: caktus/commcare-hq
 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']}
예제 #4
0
 def detail_uri_kwargs(self, bundle_or_obj):
     return {
         'pk': get_obj(bundle_or_obj).case_id
     }
예제 #5
0
 def detail_uri_kwargs(self, bundle_or_obj):
     return {'pk': get_obj(bundle_or_obj).other_model_id}
예제 #6
0
파일: v0_5.py 프로젝트: kkrampa/commcare-hq
 def detail_uri_kwargs(self, bundle_or_obj):
     return {
         'domain': get_obj(bundle_or_obj).domain,
         'pk': get_obj(bundle_or_obj)._id,
     }
예제 #7
0
 def detail_uri_kwargs(self, bundle_or_obj):
     return {
         'pk': get_obj(bundle_or_obj).other_model_id
     }