timApp.timdb package
Contents
timApp.timdb package#
Submodules#
timApp.timdb.dbaccess module#
- timApp.timdb.dbaccess.get_timdb() timApp.timdb.timdb.TimDb [source]#
Returns the TimDb object and stores it in the Flask g object.
timApp.timdb.exceptions module#
- exception timApp.timdb.exceptions.InvalidReferenceException[source]#
Bases:
timApp.timdb.exceptions.TimDbException
The exception that is thrown when a referenced paragraph or area is not found.
- exception timApp.timdb.exceptions.PreambleException[source]#
Bases:
timApp.timdb.exceptions.TimDbException
Thrown when an error occurs related to preamble processing.
timApp.timdb.init module#
Initializes the TIM database.
- timApp.timdb.init.create_enrollment_types(sess)[source]#
Initializes the enrollment types used in TIM-calendar event enrollments
- timApp.timdb.init.create_style_docs() tuple[list[timApp.folder.folder.Folder], list[timApp.document.docinfo.DocInfo]] [source]#
timApp.timdb.sqa module#
Defines the SQLAlchemy object “db” that is used by all model classes by inheriting from db.Model.
__tablename__ is not mandatory but recommended in order to maintain the naming convention for tables. The default table name is class name in lowercase.
Use Flask-Migrate for database migrations. See <http://flask-migrate.readthedocs.io/en/latest/>.
- class timApp.timdb.sqa.TimeStampMixin[source]#
Bases:
object
- created = Column(None, DateTime(timezone=True), table=None, default=ColumnDefault(<sqlalchemy.sql.functions.now at 0x7f2b47bff670; now>))#
- modified = Column(None, DateTime(timezone=True), table=None, onupdate=ColumnDefault(<sqlalchemy.sql.functions.now at 0x7f2b47bff8e0; now>), default=ColumnDefault(<sqlalchemy.sql.functions.now at 0x7f2b47bff8b0; now>))#
timApp.timdb.timdb module#
Defines the TimDb database class.