habitat.views.utils¶
Shared utility functions for views.
Functions
datetime_to_timestamp | |
must_be_admin(user[, msg]) | Raise UnauthorizedError if the user is not an admin |
parse | |
read_json_schema(schemaname) | |
rfc3339_to_datetime | |
rfc3339_to_timestamp | |
rfc3339_to_utc_datetime | |
timegm | |
validate | |
validate_doc(data, schema) | Validate data against schema, raising descriptive errors |
validate_rfc3339 | Mock out external modules that might annoy documentation build systems. |
Classes
tzutc |
Exceptions
ForbiddenError | Mock out external modules that might annoy documentation build systems. |
UnauthorizedError | Mock out external modules that might annoy documentation build systems. |
ValidationError |