fsi.models.course

Classes

Course

Extends the default Searchable class with sensible defaults

Module Contents

class fsi.models.course.Course[source]

Bases: onegov.core.orm.Base, onegov.search.ORMSearchable

Extends the default Searchable class with sensible defaults for SQLAlchemy orm models.

__tablename__ = 'fsi_courses'[source]
es_properties[source]

Returns the type mapping of this model. Each property in the mapping will be read from the model instance.

The returned object needs to be a dict or an object that provides a to_dict method.

Internally, onegov.search stores differing languages in different indices. It does this automatically through langauge detection, or by manually specifying a language.

Note that objects with multiple languages are not supported (each object is supposed to have exactly one language).

Onegov.search will automatically insert the right analyzer for types like these.

There’s currently only limited support for properties here, namely objects and nested mappings do not work! This is going to be added in the future though.

es_public = True[source]

Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.

id: Column[uuid.UUID][source]
name: Column[str][source]
description: Column[Markup][source]
refresh_interval: Column[int | None][source]
mandatory_refresh: Column[bool][source]
hidden_from_public: Column[bool][source]
evaluation_url: Column[str | None][source]
events: relationship[AppenderQuery[CourseEvent]][source]
property title: str[source]
property lead: str[source]
property description_html: markupsafe.Markup[source]

Returns the description that is saved as HTML from the redactor js plugin.

future_events() Query[CourseEvent][source]