Views
ClubEditForm(*args, **kwargs)
¶
ClubMemberForm(*args, **kwargs)
¶
Bases: Form
Form handling the members of a club.
Source code in club/forms.py
clean_users()
¶
Check that the user is not trying to add an user already in the club.
Also check that the user is valid and has a valid subscription.
Source code in club/forms.py
clean()
¶
Check user rights for adding an user.
Source code in club/forms.py
MailingForm(club_id, user_id, mailings, *args, **kwargs)
¶
Bases: Form
Form handling mailing lists right.
Source code in club/forms.py
check_required(cleaned_data, field)
¶
If the given field doesn't exist or has no value, add a required error on it.
clean_subscription_users()
¶
Convert given users into real users and check their validity.
Source code in club/forms.py
SellingsForm(club, *args, **kwargs)
¶
Bases: Form
Source code in club/forms.py
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
Mailing
¶
Bases: Model
A Mailing list for a club.
Warning
Remember that mailing lists should be validated by UTBM.
MailingSubscription
¶
Bases: Model
Link between user and mailing list.
Membership
¶
Bases: Model
The Membership class makes the connection between User and Clubs.
Both Users and Clubs can have many Membership objects
- a user can be a member of many clubs at a time
- a club can have many members at a time too
A User is currently member of all the Clubs where its Membership has an end_date set to null/None. Otherwise, it's a past membership kept because it can be very useful to see who was in which Club in the past.
ClubTabsMixin
¶
Bases: TabedViewMixin
ClubListView
¶
Bases: ListView
List the Clubs.
ClubView
¶
Bases: ClubTabsMixin
, DetailView
Front page of a Club.
ClubRevView
¶
Bases: ClubView
Display a specific page revision.
ClubPageEditView
¶
Bases: ClubTabsMixin
, PageEditViewBase
ClubPageHistView
¶
Bases: ClubTabsMixin
, CanViewMixin
, DetailView
Modification hostory of the page.
ClubToolsView
¶
Bases: ClubTabsMixin
, CanEditMixin
, DetailView
Tools page of a Club.
ClubMembersView
¶
Bases: ClubTabsMixin
, CanViewMixin
, DetailFormView
View of a club's members.
form_valid(form)
¶
Check user rights.
Source code in club/views.py
ClubOldMembersView
¶
Bases: ClubTabsMixin
, CanViewMixin
, DetailView
Old members of a club.
ClubSellingView
¶
Bases: ClubTabsMixin
, CanEditMixin
, DetailFormView
Sellings of a club.
ClubSellingCSVView
¶
Bases: ClubSellingView
Generate sellings in csv for a given period.
ClubEditView
¶
Bases: ClubTabsMixin
, CanEditMixin
, UpdateView
Edit a Club's main informations (for the club's members).
ClubEditPropView
¶
Bases: ClubTabsMixin
, CanEditPropMixin
, UpdateView
Edit the properties of a Club object (for the Sith admins).
ClubCreateView
¶
Bases: CanCreateMixin
, CreateView
Create a club (for the Sith admin).
MembershipSetOldView
¶
Bases: CanEditMixin
, DetailView
Set a membership as beeing old.
MembershipDeleteView
¶
Bases: UserIsRootMixin
, DeleteView
Delete a membership (for admins only).
ClubStatView
¶
Bases: TemplateView
ClubMailingView
¶
Bases: ClubTabsMixin
, CanEditMixin
, DetailFormView
A list of mailing for a given club.
add_new_mailing(cleaned_data)
¶
Create a new mailing list from the form.
Source code in club/views.py
add_new_subscription(cleaned_data)
¶
Add mailing subscriptions for each user given and/or for the specified email in form.
Source code in club/views.py
remove_subscription(cleaned_data)
¶
Remove specified users from a mailing list.
MailingDeleteView
¶
Bases: CanEditMixin
, DeleteView
MailingSubscriptionDeleteView
¶
Bases: CanEditMixin
, DeleteView
MailingAutoGenerationView
¶
Bases: View
PosterListView
¶
Bases: ClubTabsMixin
, PosterListBaseView
, CanViewMixin
List communication posters.
PosterCreateView
¶
Bases: PosterCreateBaseView
, CanCreateMixin
Create communication poster.
PosterEditView
¶
Bases: ClubTabsMixin
, PosterEditBaseView
, CanEditMixin
Edit communication poster.
PosterDeleteView
¶
Bases: PosterDeleteBaseView
, ClubTabsMixin
, CanEditMixin
Delete communication poster.