Package wtf :: Package app :: Module request :: Class Uploads
[hide private]
[frames] | no frames]

Class Uploads

source code

object --+
         |
        Uploads

Container for uploaded files
Instance Methods [hide private]
 
__init__(self, uploads)
Initialization
source code
file
__getitem__(self, name)
Return a single value for that name
source code
 
__iter__(self)
Return an iterator over the regular keys
source code
bool
__contains__(self, name)
Determines whether a certain key exists
source code
list
keys(self)
Determine the list of available keys
source code
tuple
multi(self, name)
Return a list of all values under that name
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
dict _pairs
Dict of form names and file objects
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, uploads)
(Constructor)

source code 
Initialization
Parameters:
  • uploads (dict) - Dict of form names and file objects
Overrides: object.__init__

__getitem__(self, name)
(Indexing operator)

source code 
Return a single value for that name
Parameters:
  • name (str) - The form name
Returns: file
File object
Raises:
  • KeyError - The name does not exist

__contains__(self, name)
(In operator)

source code 
Determines whether a certain key exists
Parameters:
  • name (str) - The key to check
Returns: bool
Does the key exist?

keys(self)

source code 
Determine the list of available keys
Returns: list
The key list

multi(self, name)

source code 
Return a list of all values under that name
Parameters:
  • name (str) - The name to look up
Returns: tuple
List of files belonging to this key