boardinghouse.models module

class boardinghouse.models.AbstractSchema(*args, **kwargs)[source]

Bases: boardinghouse.base.SharedSchemaMixin, django.db.models.base.Model

The Schema model provides an abstraction for a Postgres schema.

It will take care of creating a cloned copy of the template_schema when it is created, and also has the ability to activate and deactivate itself (at the start and end of the request cycle would be a good plan).

class boardinghouse.models.Schema(*args, **kwargs)[source]

Bases: boardinghouse.models.AbstractSchema

The default schema model.

Unless you set settings.BOARDINGHOUSE_SCHEMA_MODEL, this model will be used for storing the schema objects.

boardinghouse.models.visible_schemata(user)[source]

The list of visible schemata for the given user.

This is fetched from the cache, if the value is available. There are signal listeners that automatically invalidate the cache when conditions that are detected that would indicate this value has changed.