FeatureAnnouncement¶
Qualified name: intranet.apps.features.models.FeatureAnnouncement
- class intranet.apps.features.models.FeatureAnnouncement(*args, **kwargs)[source]¶
Bases:
ModelRepresents an announcement about a new feature on Ion that should be shown to the school.
- activation_date¶
The date on which this feature announcement should first appear.
- Type:
- expiration_date¶
The date on which this feature announcement should last appear.
- Type:
- context¶
The “context” (essentially the page) in which this feature announcement should be shown. Currently supported: dashboard, login, eighth_signup
- Type:
- announcement_html¶
The HTML of the actual announcement. WARNING: This is rendered as ‘safe’ to allow things like links. Do NOT allow untrusted content here.
- Type:
- users_dismissed¶
The users who have dismissed this feature announcement (clicked the close button). Used to hide feature announcements the user has dismissed.
- Type:
listofUser
- Parameters:
Relationship fields:
- Parameters:
users_seen (
ManyToManyFieldtoUser) – Users seen (related name:feature_announcements_seen)users_dismissed (
ManyToManyFieldtoUser) – Users dismissed (related name:feature_announcements_dismissed)
Methods
get_context_displayShows the label of the
context.get_next_by_activation_dateFinds next instance based on
activation_date.get_next_by_expiration_dateFinds next instance based on
expiration_date.get_previous_by_activation_dateFinds previous instance based on
activation_date.get_previous_by_expiration_dateFinds previous instance based on
expiration_date.Attributes
CONTEXTSType:
DateFieldType:
CharFieldType:
CharFieldType:
DateFieldidType:
AutoFieldobjectsType:
ManyToManyFieldtoUserType:
ManyToManyFieldtoUser