WarningAnnouncement¶
Qualified name: intranet.apps.announcements.models.WarningAnnouncement
- class intranet.apps.announcements.models.WarningAnnouncement(*args, **kwargs)[source]¶
Bases:
Model
Warning 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_added
Finds next instance based on
added
.get_previous_by_added
Finds previous instance based on
added
.get_type_display
Shows the label of the
type
.Save model without saving a historical record
Attributes
active
Type:
BooleanField
added
Type:
DateTimeField
content
Type:
TextField
history
id
Type:
AutoField
objects
show_on_dashboard
show_on_login
title
Type:
CharField
type
Type:
CharField
- save_without_historical_record(*args, **kwargs)¶
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.