rql_upload.hooks.ServerStartupHook

class rql_upload.hooks.ServerStartupHook(req, event, **kwargs)[source]

Deport files on file system rather than database indexation

An ‘UploadFile’ entity data is deported on the server file system. To do so, we configure the ‘UploadFile’ ‘data’ attribute with the ‘BytesFileSystemStorage’ storage. The repository location is defined at the instance creation ‘upload_directory’ (instance parameter). If no instance parameter is set, the ‘file’ field won’t be created.

__init__(req, event, **kwargs)

Methods

__init__(req, event, **kwargs)
check_events()
critical(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘CRITICAL’.
cw_propval(propid) return cw property value associated to key
debug(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘DEBUG’.
error(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘ERROR’.
exception(msg, *args, **kwargs) Convenience method for logging an ERROR with exception information.
filterable_selectors(*args, **kwargs)
info(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘INFO’.
warning(msg, *args, **kwargs) Log ‘msg % args’ with severity ‘WARNING’.

Attributes

category
eidfrom
eidto
entity
events
known_args
order
repo
rtype
__call__()[source]

Configuring the ‘BytesFileSystem’ storage.

__module__ = 'rql_upload.hooks'
__regid__ = 'rql_upload.serverstartup'
events = ('server_startup', 'server_maintenance')