AKDashboard.models module
- class AKDashboard.models.DashboardButton(*args, **kwargs)[source]
Bases:
ModelDatabase table:
AKDashboard_dashboardbuttonModel for a single dashboard button
Allows to specify * a text (currently without possibility to translate), * a color (based on predefined design colors) * a url the button should point to (internal or external) * an icon (from the collection of fontawesome)
Each button is associated with a single event and will be deleted when the event is deleted.
- Parameters:
id (AutoField) – Primary key: ID
text (CharField) – Text. Text that will be shown on the button
url (URLField) – Link URL. URL this button links to
icon (IconField) – Icon. Symbol represeting this button.
color (PositiveSmallIntegerField) – Button Style. Style (Color) of this button (bootstrap class)
Relationship fields:
- Parameters:
event (
ForeignKeytoEvent) – Event. Event this button belongs to (related name:dashboardbutton)
- class AKDashboard.models.EventFact(*args, **kwargs)[source]
Bases:
ModelDatabase table:
AKDashboard_eventfactModel for a single manually maintained fact about an event
Allows to specify facts that cannot be derived from the data stored in AKPlanning (e.g., the number of solver runs, since solving happens externally). These facts will be shown on the info page of the event together with the automatically computed facts.
Each fact is associated with a single event and will be deleted when the event is deleted.
- Parameters:
id (AutoField) – Primary key: ID
title (CharField) – Title. Short description of the fact, e.g., ‘Solver runs’
value (CharField) – Value. Value of the fact (free text), e.g., ‘17’
icon (IconField) – Icon. Symbol representing this fact
order (PositiveSmallIntegerField) – Order. Facts with lower values are shown first
Relationship fields:
- Parameters:
event (
ForeignKeytoEvent) – Event. Event this fact belongs to (related name:eventfact)