我们从Python开源项目中,提取了以下22个代码示例,用于说明如何使用django.utils.datastructures.MergeDict()。
def _get_request(self): warnings.warn('`request.REQUEST` is deprecated, use `request.GET` or ' '`request.POST` instead.', RemovedInDjango19Warning, 2) if not hasattr(self, '_request'): self._request = datastructures.MergeDict(self.POST, self.GET) return self._request
def value_from_datadict(self, data, files, name): if isinstance(data, (MultiValueDict, MergeDict)): return data.getlist(name) return data.get(name, None)
def _get_request(self): if not hasattr(self, '_request'): self._request = datastructures.MergeDict(self.POST, self.GET) return self._request
def value_from_datadict(self, data, files, name): if isinstance(data, (MultiValueDict, MergeDict)): res = data.getlist(name) else: res = data.get(name, None) #print name, res for id in res: continue #print self.rel.to.objects.get(pk=id) return res
def value_from_datadict(self, data, files, name): if isinstance(data, (MultiValueDict, MergeDict)): res = data.getlist(name) else: res = data.get(name, None) print name, res for id in res: print self.rel.to.objects.get(pk=id) return res