Settings - wrvenkat/request_parser GitHub Wiki
Usage
A Settings
object represents a dictionary of setting: value
mapping that serves as configuration information for HttpRequest
and MultiPartParser
.
Settings dictionary
The following is the list of keys defined under the Key
subclass.
Key | Default Value | Use |
---|---|---|
FILE_UPLOAD_DIR |
file_uploads folder under the files package |
Location where temp files from a multipart/form-data are stored. |
MAX_HEADER_SIZE |
1024 bytes | Maximum size of a multipart data header. |
FILE_UPLOAD_MAX_MEMORY |
30 MB | Maximum size of file to be held in memory for a single file before it is stored on disk, |
DATA_UPLOAD_MAX_MEMORY |
5 MB | Maximum size of raw request body to be held in memory before RequestDataTooBig is raised. |
DATA_UPLOAD_MAX_FIELDS |
4096 | Maximum number of GET or POST parameters allowed before TooManyFieldsSent is raised. |
DEFAULT_CHARSET |
ISO-8859-1 | Charset for an HTTP request |
Methods
__init__(settings_dict=None, check_presence=False) |
Create a new Settings object using the config dictionary settings_dict . When this is None , the default values are used.check_presense when true creates the directory provided for key FILE_UPLOAD_DIR and checks write permissions. |
default(check_presence=False) |
this class method returns a Settings object with the default values.check_presence when true creates the default directory and checks write permissions. |