Models
NEWS_TYPES = [('NOTICE', _('Notice')), ('EVENT', _('Event')), ('WEEKLY', _('Weekly')), ('CALL', _('Call'))]
module-attribute
¶
Club
¶
Bases: Model
The Club class, made as a tree to allow nice tidy organization.
check_loop()
¶
Raise a validation error when a loop is found within the parent list.
Source code in club/models.py
is_owned_by(user)
¶
can_be_edited_by(user)
¶
can_be_viewed_by(user)
¶
Method to see if that object can be seen by the given user.
get_membership_for(user)
¶
Return the current membership the given user.
Note
The result is cached.
Source code in club/models.py
Sith
¶
Bases: Model
A one instance class storing all the modifiable infos.
News
¶
Bases: Model
The news class.
NewsDate
¶
Bases: Model
A date class, useful for weekly events, or for events that just have no date.
This class allows more flexibilty managing the dates related to a news, particularly when this news is weekly, since we don't have to make copies
Weekmail
¶
Bases: Model
The weekmail class.
:ivar title: Title of the weekmail :ivar intro: Introduction of the weekmail :ivar joke: Joke of the week :ivar protip: Tip of the week :ivar conclusion: Conclusion of the weekmail :ivar sent: Track if the weekmail has been sent
send()
¶
Send the weekmail to all users with the receive weekmail option opt-in.
Also send the weekmail to the mailing list in settings.SITH_COM_EMAIL.
Source code in com/models.py
render_text()
¶
Renders a pure text version of the mail for readers without HTML support.
render_html()
¶
Renders an HTML version of the mail with images and fancy CSS.
get_banner()
¶
WeekmailArticle
¶
Bases: Model
Screen
¶
Bases: Model
Poster
¶
Bases: Model