FeatureAnnouncement¶
Qualified name: intranet.apps.features.models.FeatureAnnouncement
- class intranet.apps.features.models.FeatureAnnouncement(*args, **kwargs)[source]¶
Bases:
Model
Represents 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:
list
ofUser
- Parameters:
Relationship fields:
- Parameters:
users_seen (
ManyToManyField
toUser
) – Users seen (related name:feature_announcements_seen
)users_dismissed (
ManyToManyField
toUser
) – Users dismissed (related name:feature_announcements_dismissed
)
Methods
get_context_display
Shows the label of the
context
.get_next_by_activation_date
Finds next instance based on
activation_date
.get_next_by_expiration_date
Finds next instance based on
expiration_date
.get_previous_by_activation_date
Finds previous instance based on
activation_date
.get_previous_by_expiration_date
Finds previous instance based on
expiration_date
.Attributes
CONTEXTS
Type:
DateField
Type:
CharField
Type:
CharField
Type:
DateField
id
Type:
AutoField
objects
Type:
ManyToManyField
toUser
Type:
ManyToManyField
toUser