example.controllers.contact

contact controller

created 31-mar-2019 by richb@instantlinux.net

Classes

AccessControl([policy_file, models, model])

Role-based access control

BasicCRUD([config, models, resource, model])

Controller base class

Confirmation(config, models)

Functions for confirming ownership of online email/contact info

ContactController()

Grants(models[, db_session, ttl])

Account usage limits

datetime(year, month, day[, hour[, minute[, …)

The year, month and day arguments are required.

Exceptions

NoResultFound(*arg, **kw)

A database result was required but none was found.

class example.controllers.contact.ContactController
static confirm(token)

Record a contact as fully confirmed

Parameters

token (str) – the token that was sent in confirmation message

static confirmation_get(id)

Send a confirmation message via email (or as specified)

Parameters

id (str) – id of contact model

static create(body)

after creating record, send confirmation message

Parameters

body (dict) – as defined in openapi.yaml schema

static update(id, body)

special cases for contacts:

  • validate sms carrier

  • keep person identity in sync with primary contact

  • after updating record, send confirmation message

Parameters

body (dict) – as defined in openapi.yaml