Beispiel #1
0
    def get_file_vars(self):
        """
        :return: The name of the variables which are of file type. Since these
                 might have been change by a call to __setitem__ where the
                 developer did not update self._file_vars, I'm also updating
                 the self._file_vars attribute on each call.
        """
        file_keys = []

        for k, v_lst in self.items():
            for v in v_lst:
                if is_file_like(v):
                    file_keys.append(k)

        self._file_vars.extend(file_keys)
        self._file_vars = list(set(self._file_vars))
        return self._file_vars
Beispiel #2
0
    def get_file_vars(self):
        """
        :return: The name of the variables which are of file type
        """
        file_keys = set()

        for k, v_lst in self.meta.iteritems():
            for v in v_lst:
                if isinstance(v, FileFormField):
                    file_keys.add(k)

        for k, v_lst in self.items():
            for v in v_lst:
                if is_file_like(v):
                    file_keys.add(k)

        return list(file_keys)
Beispiel #3
0
    def get_file_vars(self):
        """
        :return: The name of the variables which are of file type
        """
        file_keys = set()

        for k, v_lst in self.meta.iteritems():
            for v in v_lst:
                if isinstance(v, FileFormField):
                    file_keys.add(k)

        for k, v_lst in self.items():
            for v in v_lst:
                if is_file_like(v):
                    file_keys.add(k)

        return list(file_keys)
Beispiel #4
0
    def get_file_vars(self):
        """
        :return: The name of the variables which are of file type. Since these
                 might have been change by a call to __setitem__ where the
                 developer did not update self._file_vars, I'm also updating
                 the self._file_vars attribute on each call.
        """
        file_keys = []

        for k, v_lst in self.items():
            for v in v_lst:
                if is_file_like(v):
                    file_keys.append(k)

        self._file_vars.extend(file_keys)
        self._file_vars = list(set(self._file_vars))
        return self._file_vars