cubicweb_web#

CubicWeb web client core. You’ll need a apache-modpython or twisted publisher to get a full CubicWeb web application

Exceptions#

Base exceptions#

Repository exceptions#

Security Exceptions#

exception cubicweb_web.Unauthorized[source]#

Bases: cubicweb._exceptions.SecurityError

raised when a user tries to perform an action without sufficient credentials

exception cubicweb_web.Forbidden[source]#

Bases: cubicweb._exceptions.SecurityError

raised when a user tries to perform a forbidden action

Source exceptions#

Registry exceptions#

Query exceptions#

Misc#

exception cubicweb_web.ValidationError(entity, errors: Dict, msgargs: Optional[Dict] = None, i18nvalues: Optional[List] = None)[source]#

Bases: yams._exceptions.SchemaError

Validation error details the reason(s) why the validation failed.

Arguments are:

  • entity: the entity that could not be validated; actual type depends on the client library

  • errors: errors dictionary, None key used for global error, other keys should be attribute/relation of the entity, qualified as subject/object using yams.role_name(). Values are the message associated to the keys, and may include interpolation string starting with ‘%(KEY-’ where ‘KEY’ will be replaced by the associated key once the message has been translated. This allows predictable/translatable message and avoid args conflict if used for several keys.

  • msgargs: dictionary of substitutions to be inserted in error messages once translated (only if msgargs is given)

  • i18nvalues: list of keys in msgargs whose value should be translated

Translation will be done in-place by calling translate().

Utilities#