app/views/whitelist.py
def process(self, params):
        """
        Reads params(dict) and returns a whitelisted dict.
        """
        self._final = {
            Whitelist.INCLUDE_NAME: self._include_names.copy()
        }
        self._fields = set(self._whitelist.keys())
        self._fields.remove(Whitelist.INCLUDE_NAME)

        # Get the list of all keys, to subtract those that get used
        self._left = params.keys()

        # Find what is included
        try:
            includes = self._whitelist[Whitelist.INCLUDE_NAME].val(params)
            self._left.remove(self._whitelist[Whitelist.INCLUDE_NAME].used_key())
        except FieldError:
            includes = False

        # TODO: Really... the best I can think of is a staircase?
        if includes:
            for key in includes:
                if self._includes.has_key(key):
                    for name in self._includes[key]:
                        self._final[Whitelist.INCLUDE_NAME][name] = True

        # Get the other fields
        self._process(params, list(self._fields))

        return self._final

        Reads params(dict) and returns a whitelisted dict.
        
Reads params(dict) and returns a whitelisted dict.
Reads params ( dict ) and returns a whitelisted dict .
def process(self, params):
        self._final = {
            Whitelist.INCLUDE_NAME: self._include_names.copy()
        }
        self._fields = set(self._whitelist.keys())
        self._fields.remove(Whitelist.INCLUDE_NAME)
        self._left = params.keys()
        try:
            includes = self._whitelist[Whitelist.INCLUDE_NAME].val(params)
            self._left.remove(self._whitelist[Whitelist.INCLUDE_NAME].used_key())
        except FieldError:
            includes = False
        if includes:
            for key in includes:
                if self._includes.has_key(key):
                    for name in self._includes[key]:
                        self._final[Whitelist.INCLUDE_NAME][name] = True
        self._process(params, list(self._fields))
        return self._final
def process ( self , params ) : self . _final = { Whitelist . INCLUDE_NAME : self . _include_names . copy ( ) } self . _fields = set ( self . _whitelist . keys ( ) ) self . _fields . remove ( Whitelist . INCLUDE_NAME ) self . _left = params . keys ( ) try : includes = self . _whitelist [ Whitelist . INCLUDE_NAME ] . val ( params ) self . _left . remove ( self . _whitelist [ Whitelist . INCLUDE_NAME ] . used_key ( ) ) except FieldError : includes = False if includes : for key in includes : if self . _includes . has_key ( key ) : for name in self . _includes [ key ] : self . _final [ Whitelist . INCLUDE_NAME ] [ name ] = True self . _process ( params , list ( self . _fields ) ) return self . _final
Reads params(dict) and returns a whitelisted dict.
Reads params ( dict ) and returns a whitelisted dict .
"""
        Reads params(dict) and returns a whitelisted dict.
        """ # Get the list of all keys, to subtract those that get used # Find what is included # TODO: Really... the best I can think of is a staircase? # Get the other fields
self
params