organisations package#
Subpackages#
- organisations.tests package
- Subpackages
- organisations.tests.integration package
- Submodules
- organisations.tests.integration.01_high_level_admin module
- organisations.tests.integration.02_club_level_admin module
- organisations.tests.integration.03_club_settings module
- organisations.tests.integration.04_club_members module
- organisations.tests.integration.05_club_comms module
- organisations.tests.integration.06_congress_setup module
- organisations.tests.integration.common_functions module
- Module contents
- organisations.tests.integration package
- Module contents
- Subpackages
- organisations.views package
- Subpackages
- organisations.views.club_menu_tabs package
- Submodules
- organisations.views.club_menu_tabs.access module
- organisations.views.club_menu_tabs.comms module
- organisations.views.club_menu_tabs.congresses module
- organisations.views.club_menu_tabs.dashboard module
- organisations.views.club_menu_tabs.finance module
- organisations.views.club_menu_tabs.import_data module
- organisations.views.club_menu_tabs.members module
- organisations.views.club_menu_tabs.results module
- organisations.views.club_menu_tabs.sessions module
- organisations.views.club_menu_tabs.settings module
- organisations.views.club_menu_tabs.utils module
- Module contents
- organisations.views.club_menu_tabs package
- Submodules
- organisations.views.admin module
add_club_defaults()
admin_add_club()
admin_blocked_memberships()
admin_club_rbac()
admin_club_rbac_add_advanced()
admin_club_rbac_add_basic()
admin_club_rbac_convert_advanced_to_basic()
admin_club_rbac_convert_advanced_to_basic_sub()
admin_club_rbac_convert_basic_to_advanced()
admin_club_rbac_convert_basic_to_advanced_sub()
admin_list_clubs()
convert_manual_club_to_automatic()
get_secretary_from_org_form()
rbac_get_basic_and_advanced()
- organisations.views.ajax module
- organisations.views.club_menu module
- organisations.views.general module
- organisations.views.home module
- Module contents
- Subpackages
Submodules#
organisations.admin module#
Generated by utils/cgit/cgit_util_generate_admin_file on 2022-01-24 14:54:06.307431
- class organisations.admin.ClubLogAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model ClubLog
- autocomplete_fields = ['organisation', 'actor']#
- property media#
- class organisations.admin.ClubMemberLogAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model ClubMemberLog
- autocomplete_fields = ['club']#
- property media#
- search_fields = ['club__name', 'system_number']#
- class organisations.admin.ClubTagAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model ClubTag
- autocomplete_fields = ['organisation']#
- property media#
- search_fields = ['organisation']#
- class organisations.admin.MemberClubDetailsAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model MemberClubDetails
- autocomplete_fields = ['club']#
- property media#
- search_fields = ['club__name', 'system_number', 'email']#
- class organisations.admin.MemberClubEmailAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model MemberClubEmail
- autocomplete_fields = ['organisation']#
- property media#
- search_fields = ['email']#
- class organisations.admin.MemberClubOptionsAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model MemberClubOptions
- autocomplete_fields = ['club']#
- property media#
- search_fields = ['club__name', 'user__last_name', 'user__first_name']#
- class organisations.admin.MemberClubTagAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model MemberClubTag
- autocomplete_fields = ['club_tag']#
- property media#
- class organisations.admin.MemberMembershipTypeAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model MemberMembershipType
- autocomplete_fields = ['membership_type', 'last_modified_by']#
- property media#
- search_fields = ['system_number']#
- class organisations.admin.MembershipTypeAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model MembershipType
- autocomplete_fields = ['organisation', 'last_modified_by']#
- property media#
- search_fields = ['organisation', 'last_modified_by']#
- class organisations.admin.MiscPayTypeAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model MiscPayType
- autocomplete_fields = ['organisation']#
- property media#
- class organisations.admin.OrgEmailTemplateAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model OrgEmailTemplate
- autocomplete_fields = ['organisation', 'last_modified_by']#
- property media#
- search_fields = ['organisation']#
- class organisations.admin.OrgVenueAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model OrgVenue
- autocomplete_fields = ['organisation']#
- property media#
- search_fields = ['organisation']#
- class organisations.admin.OrganisationAdmin(model, admin_site)[source]#
Bases:
ModelAdmin
Admin class for model Organisation
- autocomplete_fields = ['secretary', 'last_updated_by']#
- property media#
- search_fields = ['name']#
organisations.apps module#
organisations.decorators module#
Club Menu Decorators to simplify code
checks if user should have access to a club menu
Call as:
from .decorators import check_club_menu_access
@check_club_menu_access() def my_func(request, club):
You don’t need @login_required as it does that for you as well
Optional parameters:
check_members: Will also check for the role orgs.members.{club.id}.edit check_comms: Will also check for the role notifications.orgcomms.{club.id}.edit check_sessions: Will also check for the role club_sessions.sessions.{club.id}.edit check_payments: Will also check for the role payments.manage.{club.id}.edit check_payments_view: Will also check for the role payments.manage.{club.id}.[edit|view] check_org_edit: Will also check for the role orgs.org.{club.id}.edit check_session_or_payments: Checks for either sessions or payments. This is needed as directors as well as payments people need to be able to make miscellaneous payments, but we want to keep both roles separate otherwise
We add a parameter (club) to the actual call which is fine for calls from URLs but if we call this internally it will need to be called without the club parameter.
The optional parameters are only applied for normal admin users, Global or State admins get in any way even if they don’t have the extra permissions.
organisations.forms module#
- class organisations.forms.BulkRenewalLineForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]#
Bases:
Form
Options for bulk renewal of a membership type
- base_fields = {'auto_pay_date': <django.forms.fields.DateField object>, 'due_date': <django.forms.fields.DateField object>, 'end_date': <django.forms.fields.DateField object>, 'fee': <django.forms.fields.DecimalField object>, 'membership_type_id': <django.forms.fields.IntegerField object>, 'membership_type_name': <django.forms.fields.CharField object>, 'selected': <django.forms.fields.BooleanField object>, 'start_date': <django.forms.fields.DateField object>}#
- declared_fields = {'auto_pay_date': <django.forms.fields.DateField object>, 'due_date': <django.forms.fields.DateField object>, 'end_date': <django.forms.fields.DateField object>, 'fee': <django.forms.fields.DecimalField object>, 'membership_type_id': <django.forms.fields.IntegerField object>, 'membership_type_name': <django.forms.fields.CharField object>, 'selected': <django.forms.fields.BooleanField object>, 'start_date': <django.forms.fields.DateField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.BulkRenewalOptionsForm(*args, **kwargs)[source]#
Bases:
Form
A form for the common options for a batch
- base_fields = {'club_template': <django.forms.fields.ChoiceField object>, 'email_content': <django.forms.fields.CharField object>, 'email_subject': <django.forms.fields.CharField object>, 'send_notice': <django.forms.fields.BooleanField object>}#
- declared_fields = {'club_template': <django.forms.fields.ChoiceField object>, 'email_content': <django.forms.fields.CharField object>, 'email_subject': <django.forms.fields.CharField object>, 'send_notice': <django.forms.fields.BooleanField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.CSVContactUploadForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]#
Bases:
Form
Form for uploading a CSV to load contacts
- base_fields = {'file_type': <django.forms.fields.ChoiceField object>, 'overwrite': <django.forms.fields.BooleanField object>}#
- declared_fields = {'file_type': <django.forms.fields.ChoiceField object>, 'overwrite': <django.forms.fields.BooleanField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.CSVUploadForm(*args, **kwargs)[source]#
Bases:
Form
Form for uploading a CSV to load unregistered members
- base_fields = {'file_type': <django.forms.fields.ChoiceField object>, 'home_club': <django.forms.fields.BooleanField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'overwrite': <django.forms.fields.BooleanField object>}#
- declared_fields = {'file_type': <django.forms.fields.ChoiceField object>, 'home_club': <django.forms.fields.BooleanField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'overwrite': <django.forms.fields.BooleanField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.ContactAddForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]#
Bases:
Form
Form for adding a contact
- base_fields = {'first_name': <django.forms.fields.CharField object>, 'last_name': <django.forms.fields.CharField object>}#
- declared_fields = {'first_name': <django.forms.fields.CharField object>, 'last_name': <django.forms.fields.CharField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.ContactNameForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]#
Bases:
Form
Simple form to allow contcat names to be edited
- base_fields = {'first_name': <django.forms.fields.CharField object>, 'last_name': <django.forms.fields.CharField object>}#
- declared_fields = {'first_name': <django.forms.fields.CharField object>, 'last_name': <django.forms.fields.CharField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.EmailAttachmentForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
Form for uploading an attachment for a club
- class Meta[source]#
Bases:
object
- fields = ('attachment',)#
- model#
alias of
EmailAttachment
- widgets = {'attachment': <django.forms.widgets.FileInput object>}#
- base_fields = {'attachment': <django.forms.fields.FileField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.FrontPageForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
Form for the front page info for a club
- class Meta[source]#
Bases:
object
- fields = ('summary', 'organisation')#
- model#
alias of
OrganisationFrontPage
- base_fields = {'organisation': <django.forms.models.ModelChoiceField object>, 'summary': <django.forms.fields.CharField object>}#
- declared_fields = {'summary': <django.forms.fields.CharField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.MPCForm(*args, **kwargs)[source]#
Bases:
Form
Form for uploading a CSV to load unregistered members
- base_fields = {'membership_type': <django.forms.fields.ChoiceField object>}#
- declared_fields = {'membership_type': <django.forms.fields.ChoiceField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.MemberClubDetailsForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
Form for editing club member details
- class Meta[source]#
Bases:
object
- fields = ('email', 'address1', 'address2', 'state', 'postcode', 'preferred_phone', 'other_phone', 'dob', 'joined_date', 'left_date', 'club_membership_number', 'emergency_contact', 'notes')#
- model#
alias of
MemberClubDetails
- base_fields = {'address1': <django.forms.fields.CharField object>, 'address2': <django.forms.fields.CharField object>, 'club_membership_number': <django.forms.fields.CharField object>, 'dob': <django.forms.fields.DateField object>, 'email': <django.forms.fields.EmailField object>, 'emergency_contact': <django.forms.fields.CharField object>, 'joined_date': <django.forms.fields.DateField object>, 'left_date': <django.forms.fields.DateField object>, 'notes': <django.forms.fields.CharField object>, 'other_phone': <django.forms.fields.CharField object>, 'postcode': <django.forms.fields.CharField object>, 'preferred_phone': <django.forms.fields.CharField object>, 'state': <django.forms.fields.CharField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.MemberClubEmailForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]#
Bases:
Form
Form for adding or editing a local email address for a club unregistered member
- base_fields = {'email': <django.forms.fields.EmailField object>}#
- declared_fields = {'email': <django.forms.fields.EmailField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.MembershipChangeTypeForm(*args, **kwargs)[source]#
Bases:
Form
Form for changing or creating a new membership Membership type options are derived from the club parameter
- base_fields = {'due_date': <django.forms.fields.DateField object>, 'end_date': <django.forms.fields.DateField object>, 'fee': <django.forms.fields.DecimalField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'new_email': <django.forms.fields.EmailField object>, 'new_system_number': <django.forms.fields.IntegerField object>, 'payment_method': <django.forms.fields.ChoiceField object>, 'send_welcome_pack': <django.forms.fields.BooleanField object>, 'start_date': <django.forms.fields.DateField object>}#
- clean()[source]#
Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.
- declared_fields = {'due_date': <django.forms.fields.DateField object>, 'end_date': <django.forms.fields.DateField object>, 'fee': <django.forms.fields.DecimalField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'new_email': <django.forms.fields.EmailField object>, 'new_system_number': <django.forms.fields.IntegerField object>, 'payment_method': <django.forms.fields.ChoiceField object>, 'send_welcome_pack': <django.forms.fields.BooleanField object>, 'start_date': <django.forms.fields.DateField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.MembershipExtendForm(*args, **kwargs)[source]#
Bases:
Form
Form for extending an existing membership
- base_fields = {'auto_pay_date': <django.forms.fields.DateField object>, 'club_template': <django.forms.fields.ChoiceField object>, 'due_date': <django.forms.fields.DateField object>, 'email_content': <django.forms.fields.CharField object>, 'email_subject': <django.forms.fields.CharField object>, 'fee': <django.forms.fields.DecimalField object>, 'new_end_date': <django.forms.fields.DateField object>, 'payment_method': <django.forms.fields.ChoiceField object>, 'send_notice': <django.forms.fields.BooleanField object>}#
- declared_fields = {'auto_pay_date': <django.forms.fields.DateField object>, 'club_template': <django.forms.fields.ChoiceField object>, 'due_date': <django.forms.fields.DateField object>, 'email_content': <django.forms.fields.CharField object>, 'email_subject': <django.forms.fields.CharField object>, 'fee': <django.forms.fields.DecimalField object>, 'new_end_date': <django.forms.fields.DateField object>, 'payment_method': <django.forms.fields.ChoiceField object>, 'send_notice': <django.forms.fields.BooleanField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.MembershipPaymentForm(*args, **kwargs)[source]#
Bases:
Form
Form for paying membership fees. Does not provide a no selection option for the payment method
- base_fields = {'payment_method': <django.forms.fields.ChoiceField object>}#
- declared_fields = {'payment_method': <django.forms.fields.ChoiceField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.MembershipRawEditForm(*args, **kwargs)[source]#
Bases:
ModelForm
Form for raw editing of a membership record
- class Meta[source]#
Bases:
object
- exclude = ['system_number', 'home_club', 'last_modified_by', 'membership_type', 'payment_method', 'membership_state']#
- model#
alias of
MemberMembershipType
- base_fields = {'auto_pay_date': <django.forms.fields.DateField object>, 'due_date': <django.forms.fields.DateField object>, 'end_date': <django.forms.fields.DateField object>, 'fee': <django.forms.fields.DecimalField object>, 'is_paid': <django.forms.fields.BooleanField object>, 'membership_state': <django.forms.fields.ChoiceField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'paid_date': <django.forms.fields.DateField object>, 'paid_until_date': <django.forms.fields.DateField object>, 'payment_method': <django.forms.fields.ChoiceField object>, 'start_date': <django.forms.fields.DateField object>}#
- clean()[source]#
Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.
- declared_fields = {'membership_state': <django.forms.fields.ChoiceField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'payment_method': <django.forms.fields.ChoiceField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.MembershipTypeForm(*args, **kwargs)[source]#
Bases:
ModelForm
- class Meta[source]#
Bases:
object
- fields = ('name', 'description', 'annual_fee', 'is_default', 'grace_period_days', 'does_not_renew')#
- model#
alias of
MembershipType
- base_fields = {'annual_fee': <django.forms.fields.DecimalField object>, 'description': <django.forms.fields.CharField object>, 'does_not_renew': <django.forms.fields.BooleanField object>, 'grace_period_days': <django.forms.fields.IntegerField object>, 'is_default': <django.forms.fields.BooleanField object>, 'name': <django.forms.fields.CharField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.MinimumBalanceAfterSettlementForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
form for minimum_balance_after_settlement
- class Meta[source]#
Bases:
object
- fields = ('minimum_balance_after_settlement',)#
- model#
alias of
Organisation
- base_fields = {'minimum_balance_after_settlement': <django.forms.fields.DecimalField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.OrgDatesForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
- class Meta[source]#
Bases:
object
- fields = ('membership_renewal_date_day', 'membership_renewal_date_month', 'full_club_admin')#
- model#
alias of
Organisation
- base_fields = {'full_club_admin': <django.forms.fields.BooleanField object>, 'membership_renewal_date_day': <django.forms.fields.IntegerField object>, 'membership_renewal_date_month': <django.forms.fields.IntegerField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.OrgDefaultSecondaryPaymentMethod(*args, **kwargs)[source]#
Bases:
ModelForm
- class Meta[source]#
Bases:
object
- fields = ('default_secondary_payment_method',)#
- model#
alias of
Organisation
- base_fields = {'default_secondary_payment_method': <django.forms.models.ModelChoiceField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.OrgForm(*args, **kwargs)[source]#
Bases:
ModelForm
- class Meta[source]#
Bases:
object
- choices = [('', 'Select State...'), ('ACT', 'ACT'), ('NSW', 'NSW'), ('NT', 'NT'), ('QLD', 'QLD'), ('SA', 'SA'), ('TAS', 'TAS'), ('VIC', 'VIC'), ('WA', 'WA')]#
- fields = ('secretary', 'name', 'org_id', 'club_email', 'club_website', 'address1', 'address2', 'suburb', 'state', 'postcode', 'bank_bsb', 'bank_account', 'default_secondary_payment_method')#
- model#
alias of
Organisation
- state = 6751#
- widgets = {'state': <django.forms.widgets.Select object>}#
- base_fields = {'address1': <django.forms.fields.CharField object>, 'address2': <django.forms.fields.CharField object>, 'bank_account': <django.forms.fields.CharField object>, 'bank_bsb': <django.forms.fields.CharField object>, 'club_email': <django.forms.fields.CharField object>, 'club_website': <django.forms.fields.CharField object>, 'default_secondary_payment_method': <django.forms.models.ModelChoiceField object>, 'name': <django.forms.fields.CharField object>, 'org_id': <django.forms.fields.CharField object>, 'postcode': <django.forms.fields.CharField object>, 'secretary': <django.forms.models.ModelChoiceField object>, 'state': <django.forms.fields.CharField object>, 'suburb': <django.forms.fields.CharField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.OrgFormOld(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
- class Meta[source]#
Bases:
object
- fields = ('name', 'address1', 'address2', 'suburb', 'state', 'postcode', 'bank_bsb', 'bank_account')#
- model#
alias of
Organisation
- base_fields = {'address1': <django.forms.fields.CharField object>, 'address2': <django.forms.fields.CharField object>, 'bank_account': <django.forms.fields.CharField object>, 'bank_bsb': <django.forms.fields.CharField object>, 'name': <django.forms.fields.CharField object>, 'postcode': <django.forms.fields.CharField object>, 'state': <django.forms.fields.CharField object>, 'suburb': <django.forms.fields.CharField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.PaymentTypeForm(*args, **kwargs)[source]#
Bases:
Form
Form to add a payment type to an organisation
- base_fields = {'payment_name': <django.forms.fields.CharField object>}#
- declared_fields = {'payment_name': <django.forms.fields.CharField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.ResultsEmailMessageForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
Form for the results email message sent to players for a club
- class Meta[source]#
Bases:
object
- fields = ('results_email_message',)#
- model#
alias of
Organisation
- base_fields = {'results_email_message': <django.forms.fields.CharField object>}#
- declared_fields = {'results_email_message': <django.forms.fields.CharField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.ResultsFileForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
Form for uploading a results file
- class Meta[source]#
Bases:
object
- fields = ('results_file',)#
- model#
alias of
ResultsFile
- widgets = {'results_file': <django.forms.widgets.FileInput object>}#
- base_fields = {'results_file': <django.forms.fields.FileField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.TagForm(*args, **kwargs)[source]#
Bases:
Form
Form to add a tag to an organisation
- base_fields = {'tag_name': <django.forms.fields.CharField object>}#
- declared_fields = {'tag_name': <django.forms.fields.CharField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.TagMultiForm(*args, **kwargs)[source]#
Bases:
Form
Form to select multiple tags
- base_fields = {'selected_tags': <django.forms.fields.MultipleChoiceField object>}#
- declared_fields = {'selected_tags': <django.forms.fields.MultipleChoiceField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.TemplateBannerForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
Form for editing email template banner
- class Meta[source]#
Bases:
object
- fields = ('banner', 'x', 'y', 'width', 'height')#
- model#
alias of
OrgEmailTemplate
- widgets = {'file': <django.forms.widgets.FileInput object>}#
- base_fields = {'banner': <django.forms.fields.ImageField object>, 'height': <django.forms.fields.FloatField object>, 'width': <django.forms.fields.FloatField object>, 'x': <django.forms.fields.FloatField object>, 'y': <django.forms.fields.FloatField object>}#
- declared_fields = {'height': <django.forms.fields.FloatField object>, 'width': <django.forms.fields.FloatField object>, 'x': <django.forms.fields.FloatField object>, 'y': <django.forms.fields.FloatField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.TemplateForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#
Bases:
ModelForm
Form for editing email template
- class Meta[source]#
Bases:
object
- fields = ('footer', 'template_name', 'from_name', 'reply_to', 'box_colour', 'box_font_colour')#
- model#
alias of
OrgEmailTemplate
- base_fields = {'box_colour': <django.forms.fields.CharField object>, 'box_font_colour': <django.forms.fields.CharField object>, 'footer': <django.forms.fields.CharField object>, 'from_name': <django.forms.fields.CharField object>, 'reply_to': <django.forms.fields.EmailField object>, 'template_name': <django.forms.fields.CharField object>}#
- declared_fields = {'footer': <django.forms.fields.CharField object>, 'reply_to': <django.forms.fields.EmailField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.UnregisteredUserAddForm(*args, **kwargs)[source]#
Bases:
Form
Form for adding an unregistered user along with the email, home club and membership type
- base_fields = {'club_email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'home_club': <django.forms.fields.BooleanField object>, 'last_name': <django.forms.fields.CharField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'send_welcome_email': <django.forms.fields.BooleanField object>, 'system_number': <django.forms.fields.IntegerField object>}#
- declared_fields = {'club_email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'home_club': <django.forms.fields.BooleanField object>, 'last_name': <django.forms.fields.CharField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'send_welcome_email': <django.forms.fields.BooleanField object>, 'system_number': <django.forms.fields.IntegerField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.UnregisteredUserMembershipForm(*args, **kwargs)[source]#
Bases:
Form
Form for handling home club and membership type
- base_fields = {'home_club': <django.forms.fields.BooleanField object>, 'membership_type': <django.forms.fields.ChoiceField object>}#
- declared_fields = {'home_club': <django.forms.fields.BooleanField object>, 'membership_type': <django.forms.fields.ChoiceField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.UserMembershipForm(*args, **kwargs)[source]#
Bases:
Form
Form for getting a registered user and a membership type
- base_fields = {'home_club': <django.forms.fields.BooleanField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'send_welcome_email': <django.forms.fields.BooleanField object>, 'system_number': <django.forms.fields.IntegerField object>}#
- declared_fields = {'home_club': <django.forms.fields.BooleanField object>, 'membership_type': <django.forms.fields.ChoiceField object>, 'send_welcome_email': <django.forms.fields.BooleanField object>, 'system_number': <django.forms.fields.IntegerField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.VenueForm(*args, **kwargs)[source]#
Bases:
Form
Form to add a venue to an organisation
- base_fields = {'venue_name': <django.forms.fields.CharField object>}#
- declared_fields = {'venue_name': <django.forms.fields.CharField object>}#
- property media#
Return all media required to render the widgets on this form.
- class organisations.forms.WelcomePackForm(*args, **kwargs)[source]#
Bases:
ModelForm
Form for the welcome packs for a club
- class Meta[source]#
Bases:
object
- fields = ('template', 'welcome_email')#
- model#
alias of
WelcomePack
- base_fields = {'template': <django.forms.models.ModelChoiceField object>, 'welcome_email': <django.forms.fields.CharField object>}#
- declared_fields = {'welcome_email': <django.forms.fields.CharField object>}#
- property media#
Return all media required to render the widgets on this form.
- organisations.forms.club_email_template_choices(club)[source]#
Return available club email template choices
Returns a list of (OrgEmailTemplate id, template name) including a null choice of (-1. ‘-‘)
organisations.model_managers module#
organisations.models module#
- class organisations.models.ClubLog(*args, **kwargs)[source]#
Bases:
Model
log of things that happen for a Club
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- action#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- action_date#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- actor#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- actor_id#
- get_next_by_action_date(*, field=<django.db.models.fields.DateTimeField: action_date>, is_next=True, **kwargs)#
- get_previous_by_action_date(*, field=<django.db.models.fields.DateTimeField: action_date>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id#
- class organisations.models.ClubMemberLog(*args, **kwargs)[source]#
Bases:
Model
log of things that happen for a member in a club
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- actor#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- actor_id#
- club#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- club_id#
- date#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=True, **kwargs)#
- get_previous_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- system_number#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class organisations.models.ClubTag(*args, **kwargs)[source]#
Bases:
Model
Tags are used by clubs to group members together mainly for email purposes. This is the definition for a tag
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- memberclubtag_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id#
- tag_name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class organisations.models.MemberClubDetails(*args, **kwargs)[source]#
Bases:
Model
Club specific details about a member.
Note that this is a different model to the previous MemberClubEmail model. All club members will have a MemberClubDetails record regardless of whether they are registered or unregistered in My ABF, and regardless of whether their is a club specific email.
latest+membership and membership_status are programmatically set, not determined at runtime, to allow database queries to use these attributes efficiently.
Note that some fields are duplicates of fields in the User model. This is to allow members to supply different information to clubs.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- MEMBERSHIP_STATUS = [('CUR', 'Current'), ('FUT', 'Future'), ('DUE', 'Due'), ('END', 'Ended'), ('LAP', 'Lapsed'), ('RES', 'Resigned'), ('TRM', 'Terminated'), ('DEC', 'Deceased'), ('CON', 'Contact')]#
- MEMBERSHIP_STATUS_CONTACT = 'CON'#
- MEMBERSHIP_STATUS_CURRENT = 'CUR'#
- MEMBERSHIP_STATUS_DECEASED = 'DEC'#
- MEMBERSHIP_STATUS_DUE = 'DUE'#
- MEMBERSHIP_STATUS_ENDED = 'END'#
- MEMBERSHIP_STATUS_FUTURE = 'FUT'#
- MEMBERSHIP_STATUS_LAPSED = 'LAP'#
- MEMBERSHIP_STATUS_RESIGNED = 'RES'#
- MEMBERSHIP_STATUS_TERMINATED = 'TRM'#
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- address1#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- address2#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- club#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- club_id#
- club_membership_number#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- dob#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- email#
Club specific email address
- email_hard_bounce#
Set this flag if we get a hard bounce from sending an email
- email_hard_bounce_date#
Date of a hard bounce
- email_hard_bounce_reason#
Reason for the bounce
- emergency_contact#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_membership_status_display(*, field=<django.db.models.fields.CharField: membership_status>)#
- get_previous_membership_status_display(*, field=<django.db.models.fields.CharField: previous_membership_status>)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property is_active_status#
Is the member in one of the active statuses
- joined_date#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- latest_membership#
The most recent MemberMembershipRecord for this member, may not be current
- latest_membership_id#
- property latest_paid_until_date#
Return the current paid until date (may be from a future dated membership), or the latest paid until date from non-current memberships, or None
- left_date#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- membership_status#
The current state of this membership, note this is date dependent
- notes#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- other_phone#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property outstanding_fees#
returns the total outstanding fees for this member
- postcode#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- preferred_phone#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- previous_membership_status#
The current state of this membership, note this is date dependent
- refresh_status(as_at_date=None, commit=True)[source]#
Ensure that the membership status and current membership are correct.
- Parameters:
as_at_date (Date or None) – the date to use, current if None
commit (boolean) – save changes?
- Returns:
was a change made?
- Return type:
boolean
Note: this calls refresh_state on the most recent MemberMembershipType. Note: if this is called with commit=False, the caller needs to handle saving any changes made to the most recent MemberMembershipType.
- state#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- system_number#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class organisations.models.MemberClubEmail(*args, **kwargs)[source]#
Bases:
Model
This is used for people who are NOT signed yp to Cobalt. This is for Clubs to keep track of the email addresses of their members. Email addresses are an emotive topic in Australian bridge with clubs often refusing to share their email lists with others (including State bodies and the ABF) for fear that their rivals will get hold of their member’s contact details and lure them away.
We initially had a public email on the UnregisteredUser object but this was removed. You may find old references to this in the code. Now we only have an email address stored in here and it is only available to the club that set it up.
Once a user signs up for Cobalt this is no longer required and the user themselves can manage their own contact details.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- email#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- email_hard_bounce#
Set this flag if we get a hard bounce from sending an email
- email_hard_bounce_date#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- email_hard_bounce_reason#
Reason for the bounce
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id#
- system_number#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class organisations.models.MemberClubOptions(*args, **kwargs)[source]#
Bases:
Model
Member controlled options relating to a club
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- SHARE_DATA_ALWAYS = 'ALWAYS'#
- SHARE_DATA_CHOICES = [('NEVER', 'Never'), ('ONCE', 'Once'), ('ALWAYS', 'Always')]#
- SHARE_DATA_NEVER = 'NEVER'#
- SHARE_DATA_ONCE = 'ONCE'#
- allow_auto_pay#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- allow_membership#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- club#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- club_id#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id#
- class organisations.models.MemberClubTag(*args, **kwargs)[source]#
Bases:
Model
Links a member to a tag for a club
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- club_tag#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- club_tag_id#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- system_number#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class organisations.models.MemberMembershipType(*args, **kwargs)[source]#
Bases:
Model
This links members to a club membership. Note that a player can have multiple records for an organisation, but they should be non-overlapping in time. Only the most recent determines the overall membership status for the person.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- MEMBERSHIP_STATE = [('CUR', 'Current'), ('FUT', 'Future'), ('DUE', 'Due'), ('END', 'Ended'), ('LAP', 'Lapsed'), ('RES', 'Resigned'), ('TRM', 'Terminated'), ('DEC', 'Deceased')]#
- MEMBERSHIP_STATE_CURRENT = 'CUR'#
- MEMBERSHIP_STATE_DECEASED = 'DEC'#
- MEMBERSHIP_STATE_DUE = 'DUE'#
- MEMBERSHIP_STATE_ENDED = 'END'#
- MEMBERSHIP_STATE_FUTURE = 'FUT'#
- MEMBERSHIP_STATE_LAPSED = 'LAP'#
- MEMBERSHIP_STATE_RESIGNED = 'RES'#
- MEMBERSHIP_STATE_TERMINATED = 'TRM'#
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- class OrgPaymentMethod(*args, **kwargs)#
Bases:
Model
Defines the types of payments that an organisation will accept These are Bridge Credits plus any kind of off system payment. We allow an organisation to enter anything they like here but create sensible defaults for them.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- active#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- membermembershiptype_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>#
- org_secondary_payment_type#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- organisation#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id#
- payment_method#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- session_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- sessionentry_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- sessionmiscpayment_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- sessiontypepaymentmethod_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- auto_pay_date#
Date at which an automatic Bridge Credit payment will be attempted
- created_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property description#
A description of the record, for use in logging
- due_date#
Date by which payment is due, none if paid, otherwise typically paid_until_date plus a grace period
- end_date#
Membership end date, None if membership type is perpetual
- fee#
The fee payable
- get_membership_state_display(*, field=<django.db.models.fields.CharField: membership_state>)#
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)#
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)#
- home_club#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property is_active_state#
Is this one of the active states (current or due)
- property is_in_effect#
Is this currently in the effective date range Note: logic to handle no start date for simple mode
- is_paid#
Has payment been made successfully (or is the membership free)
- last_modified_by#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- last_modified_by_id#
- memberclubdetails_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- membership_state#
The current state of this membership, note this is date dependent
- membership_type#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- membership_type_id#
- objects = <django.db.models.manager.Manager object>#
- paid_date#
Date of Payment
- paid_until_date#
Typically either the end_date or the end of the previous period
- payment_method#
The payment method used, if any
- payment_method_id#
- property period#
A string representation of the effective period
- refresh_state(as_at_date=None, commit=True)[source]#
Ensure that the membership state is correct.
No changes are made if the object is already in a finalised state (eg deceased) or the membership type is not renewing
- Parameters:
as_at_date (Date or None) – the date to use, current if None
commit (boolean) – save changes?
- Returns:
was a change made?
- Return type:
boolean
- start_date#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- system_number#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class organisations.models.MembershipType(*args, **kwargs)[source]#
Bases:
Model
Clubs can have multiple membership types. A member can only belong to one membership type per club at one time
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- annual_fee#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- does_not_pay_session_fees#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- does_not_renew#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)#
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)#
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)#
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)#
- grace_period_days#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_default#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_modified_by#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- last_modified_by_id#
- membermembershiptype_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id#
- sessiontypepaymentmethodmembership_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- updated_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class organisations.models.MiscPayType(*args, **kwargs)[source]#
Bases:
Model
Labels for different kinds of miscellaneous payments for clubs. eg. Parking, books
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- default_amount#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id#
- class organisations.models.OrgEmailTemplate(*args, **kwargs)[source]#
Bases:
Model
Allow an organisation to handle their own email templates
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- banner#
Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
- batches#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- box_colour#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- box_font_colour#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- from_name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)#
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)#
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)#
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_modified_by#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- last_modified_by_id#
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id#
- reply_to#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args, **kwargs)[source]#
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- template_name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- welcome_pack_template#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class organisations.models.OrgVenue(*args, **kwargs)[source]#
Bases:
Model
Used by clubs that have multiple venues so we can identify sessions properly
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id#
- session_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- venue#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class organisations.models.Organisation(*args, **kwargs)[source]#
Bases:
Model
Many of these fields map to fields in the Masterpoints Database We don’t worry about phone numbers and addresses for secretaries and MP secretaries They seem to relate to sending letters to people. We keep the Venue address though.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- ORG_STATUS = [('Open', 'Open'), ('Closed', 'Closed')]#
- ORG_TYPE = [('Club', 'Bridge Club'), ('State', 'State Association'), ('National', 'National Body'), ('Other', 'Other')]#
- account_regex = <django.core.validators.RegexValidator object>#
- added_by_club#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- address1#
maps to MPC VenueAddress1
- address2#
maps to MPC VenueAddress2
- attachment_org#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- bank_account#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- bank_bsb#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- batches#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- bsb_regex = <django.core.validators.RegexValidator object>#
- club_email#
maps to PMC ClubEmail
- club_website#
maps to MPC ClubWebsite
- clublog_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- clubmemberlog_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- clubtag_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- congressmaster_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property current_end_date#
The end date of the current membership period (today or later)
- default_secondary_payment_method#
bridge credits are the default, but we can use a secondary default if bridge credits aren’t an option
- default_secondary_payment_method_id#
- emailbatchrbac_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- full_club_admin#
enable full club admin functionality
- get_next_by_last_updated(*, field=<django.db.models.fields.DateTimeField: last_updated>, is_next=True, **kwargs)#
- get_previous_by_last_updated(*, field=<django.db.models.fields.DateTimeField: last_updated>, is_next=False, **kwargs)#
- get_status_display(*, field=<django.db.models.fields.CharField: status>)#
- get_type_display(*, field=<django.db.models.fields.CharField: type>)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_registration_invite_by_club#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property last_renewal_date#
the most recent past renewal date, ie the start of the current club membership year
- last_updated#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_updated_by#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- last_updated_by_id#
- memberclubdetails_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- memberclubemail_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- membercluboptions_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- membership_renewal_date_day#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- membership_renewal_date_month#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- membershiptype_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- membertransaction_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- minimum_balance_after_settlement#
How much of a float to leave in the account balance when settlement takes place
- miscpaytype_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name#
maps to MPC ClubName
- property next_end_date#
the end date of the forthcoming annual renewal cycle One year on from the current_renewal_date
- property next_renewal_date#
the forthcoming annual renewal date (could be today)
- objects = <django.db.models.manager.Manager object>#
- org_id#
maps to MPC OrgID
- organisationfrontpage#
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- organisationsettlementfees#
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- orgemailtemplate_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- orgpaymentmethod_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- orgvenue_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- postcode#
maps to MPC VenuePostcode
- primary_org#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property rbac_admin_name_qualifier#
This shows where in the RBAC admin tree this club lives.
- property rbac_name_qualifier#
We use the rbac name qualifier a lot for clubs. Neater to have as a property
This shows where in the RBAC tree this club lives.
- results_email_message#
Message sent with the results emails
- resultsfile_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- secondary_org#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- secretary#
maps to MPC ClubSecName, but we need to map this to a Cobalt user so not a CharField
- secretary_id#
- send_results_email#
Club level control over whether an email is sent to members when results are published
- sessiontype_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property settlement_fee_percent#
return what our settlement fee is set to
- slug_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- state#
maps to MPC VenueState
- status#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- stripetransaction_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- suburb#
maps to MPC Venue suburb
- type#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- use_last_payment_method_for_player_sessions#
some clubs want to default payments for sessions to use whatever the player last paid with
- userpendingpayment_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- visitor_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- welcomepack#
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- xero_contact_id#
optional customer id for Xero
- class organisations.models.OrganisationFrontPage(*args, **kwargs)[source]#
Bases:
Model
Basic information about an organisation, primarily for the public profile. Likely to be extended later
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- organisation_id#
- save(*args, **kwargs)[source]#
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- summary#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class organisations.models.RenewalParameters(club, membership_type=None, fee=None, due_date=None, auto_pay_date=None, start_date=None, end_date=None, send_notice=False, email_subject=None, email_content=None, club_template=None, is_paid=False, payment_method=None, paid_date=None)[source]#
Bases:
object
A class to represent the parameters for a renewal.
It contains all of the parameters necessary to define a bulk or individual renewal and to create a renewal or payment notice, other than the member to which it is being applied.
Note: This is not a database model.
- class organisations.models.Visitor(*args, **kwargs)[source]#
Bases:
Model
Visitors to a club
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- email#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- first_name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- notes#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id#
- class organisations.models.WelcomePack(*args, **kwargs)[source]#
Bases:
Model
Clubs can manage a welcome email for new members
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- created_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)#
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)#
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)#
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_modified_by#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- last_modified_by_id#
- objects = <django.db.models.manager.Manager object>#
- organisation#
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- organisation_id#
- save(*args, **kwargs)[source]#
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- template#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- template_id#
- updated_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- welcome_email#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.