Python django.utils.datastructures 模块,MergeDict() 实例源码

我们从Python开源项目中,提取了以下22个代码示例,用于说明如何使用django.utils.datastructures.MergeDict()

项目:django-sanic-adaptor    作者:ashleysommer    | 项目源码 | 文件源码
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
项目:DjangoBlog    作者:0daybug    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:DjangoBlog    作者:0daybug    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:DjangoBlog    作者:0daybug    | 项目源码 | 文件源码
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
项目:trydjango18    作者:lucifer-yqh    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:trydjango18    作者:lucifer-yqh    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:trydjango18    作者:lucifer-yqh    | 项目源码 | 文件源码
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
项目:trydjango18    作者:wei0104    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:trydjango18    作者:wei0104    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:trydjango18    作者:wei0104    | 项目源码 | 文件源码
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
项目:tissuelab    作者:VirtualPlants    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:tissuelab    作者:VirtualPlants    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:tissuelab    作者:VirtualPlants    | 项目源码 | 文件源码
def _get_request(self):
        if not hasattr(self, '_request'):
            self._request = datastructures.MergeDict(self.POST, self.GET)
        return self._request
项目:geekpoint    作者:Lujinghu    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:geekpoint    作者:Lujinghu    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:geekpoint    作者:Lujinghu    | 项目源码 | 文件源码
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
项目:partytime    作者:sunlightlabs    | 项目源码 | 文件源码
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
项目:partytime    作者:sunlightlabs    | 项目源码 | 文件源码
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
项目:partytime    作者:sunlightlabs    | 项目源码 | 文件源码
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
项目:django-wechat-api    作者:crazy-canux    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:django-wechat-api    作者:crazy-canux    | 项目源码 | 文件源码
def value_from_datadict(self, data, files, name):
        if isinstance(data, (MultiValueDict, MergeDict)):
            return data.getlist(name)
        return data.get(name, None)
项目:django-wechat-api    作者:crazy-canux    | 项目源码 | 文件源码
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