WarningAnnouncement¶
Qualified name: intranet.apps.announcements.models.WarningAnnouncement
- class intranet.apps.announcements.models.WarningAnnouncement(*args, **kwargs)[source]¶
Bases:
ModelWarning in yellow to show on Ion
- Parameters:
id (AutoField) – Primary key: ID
title (CharField) – Title
content (TextField) – Content. Content of the warning. You can use HTML here.
type (CharField) – Type
active (BooleanField) – Active. Whether or not to show the warning.
added (DateTimeField) – Added
Methods
get_next_by_addedFinds next instance based on
added.get_previous_by_addedFinds previous instance based on
added.get_type_displayShows the label of the
type.Save the model instance without creating a historical record.
Attributes
activeType:
BooleanFieldaddedType:
DateTimeFieldcontentType:
TextFieldhistoryidType:
AutoFieldobjectsshow_on_dashboardshow_on_logintitleType:
CharFieldtypeType:
CharField- save_without_historical_record(*args, **kwargs)¶
Save the model instance without creating a historical record.
Make sure you know what you’re doing before using this method.