organisations.views.club_menu_tabs package

organisations.views.club_menu_tabs package#

Submodules#

organisations.views.club_menu_tabs.access module#

organisations.views.club_menu_tabs.access.access_advanced(request, club, errors={})[source]#

Do the work for the Access tab on the club menu for advanced RBAC.

organisations.views.club_menu_tabs.access.access_basic(request, club, message=None)[source]#

Do the work for the Access tab on the club menu for basic RBAC.

organisations.views.club_menu_tabs.comms module#

organisations.views.club_menu_tabs.comms.email_preview_htmx(request)[source]#

Preview an email as user creates it

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.finance.organisation_transactions_filtered_data(request, club, start_date, end_date, description_search, view_type_selector, transaction_type)[source]#

show filtered data (date and search) on screen, not as CSV/XLS download

organisations.views.club_menu_tabs.finance.organisation_transactions_filtered_data_all(request, club, start_date, end_date, description_search, hx_data)[source]#

handle the all option

organisations.views.club_menu_tabs.finance.organisation_transactions_filtered_data_combined(request, club, start_date, end_date, hx_data)[source]#

handle the all option

organisations.views.club_menu_tabs.finance.organisation_transactions_filtered_data_congresses(request, club, start_date, end_date, hx_data)[source]#

handle the congress option

organisations.views.club_menu_tabs.finance.organisation_transactions_filtered_data_events(request, club, start_date, end_date, hx_data)[source]#

handle the events option

organisations.views.club_menu_tabs.finance.organisation_transactions_filtered_data_sessions(request, club, start_date, end_date, hx_data)[source]#

handle the sessions option

organisations.views.club_menu_tabs.finance.organisation_transactions_filtered_data_txntype(request, club, start_date, end_date, description_search, hx_data, transaction_type)[source]#

handle the filter by transaction type option

organisations.views.club_menu_tabs.finance.pay_member_from_organisation(request, club, amount, description, member, event_id=-1, session_id=-1, is_membership_fee=False)[source]#

Pay a member from an organisation’s account. Calling module is responsible for security.

This works off the request object.

Request should have member_id, description and amount. Although description can be overridden as a parameter

Return: status, message

Status is True/False for success Message contains tet narrative

organisations.views.club_menu_tabs.finance.top_up_member_from_organisation(request, club, amount, description, member)[source]#

Pay a member from an organisation’s account when a top up is made. Calling module is responsible for security.

This works off the request object.

Request should have member_id, description and amount. Although description can be overridden as a parameter

Return: status, message

Status is True/False for success Message contains tet narrative

organisations.views.club_menu_tabs.import_data module#

organisations.views.club_menu_tabs.import_data.add_member_to_membership(club: Organisation, club_member: dict, user: User, default_membership: MembershipType, overwrite: bool = False, home_club: bool = False, is_registered_user: bool = True)[source]#

Sub process to add a member to the club. Returns 0 if already there or 1 for counting purposes, plus an error or warning if one is found

Parameters:

user (User) – logged in user making the request

organisations.views.club_menu_tabs.import_data.process_contact_import(club: Organisation, contact_data: list, user: User, origin: str, overwrite: bool)[source]#

Process a list of imported contacts

Parameters:
  • club (Organisation) – the club

  • contact_data (list) – list of contact details (dictionaries keyed by attribute name)

  • user (User) – processing user

  • origin (str) – file type being uploaded

  • overwrite (bool) – overwrite existing values with new

Returns:

number of contacts added int: number of existing contacts updated errors: list of error/warning messages

Return type:

int

organisations.views.club_menu_tabs.import_data.process_member_import(club: Organisation, member_data: list, user: User, origin: str, default_membership: MembershipType, overwrite: bool, home_club: bool = False)[source]#

Common function to process a list of members

Parameters:
  • club – Club object

  • member_data – list of data

  • user – Logged in user who is making this change

  • origin – Where did we get this data from?

  • default_membership – Which membership to add this user to. Can be overridden at the row level

  • home_club – Is this the home club for this user

organisations.views.club_menu_tabs.import_data.state_from_postcode(postcode)[source]#

Returns the three leter Australian state string for a given postcode

Parameters:

postcode (str) – some postcode string

Returns:

state string or None

Return type:

str

organisations.views.club_menu_tabs.import_data.validate_header(header_row, mapping)[source]#

Validate the header row against the mapping, Return success and a error message (or None)

organisations.views.club_menu_tabs.import_data.validate_start_and_end(attr_dict)[source]#

Do some basic validtion on the start and end dates that may be in the dict

organisations.views.club_menu_tabs.members module#

organisations.views.club_menu_tabs.members.add_member_search_htmx(request)[source]#

Search function for adding a member (registered, unregistered or from MPC)

This is also borrowed by the edit_session_entry screen in club_sessions to change the user. They set a flag, so we can use their template instead of ours.

organisations.views.club_menu_tabs.members.add_misc_payment_pay(request, club, member, amount, misc_description)[source]#

Handle club paying a member

organisations.views.club_menu_tabs.members.club_admin_report_active_csv(request, club_id)[source]#

CSV of active members. We can’t use the decorator as I can’t get HTMX to treat this as a CSV

organisations.views.club_menu_tabs.members.club_admin_report_all_csv(request, club_id, active_only=False)[source]#

CSV of all members. We can’t use the decorator as I can’t get HTMX to treat this as a CSV

organisations.views.club_menu_tabs.members.email_unpaid(request, club_id)[source]#

Initiate email batch to unpaid members

organisations.views.club_menu_tabs.members.get_mpc_details(club, system_number)[source]#

Return the MCP details for the player, including an email address if the player is a home club member. Also includes home club name

NOTE: This matches home clubs based on club name rather than testing Organisaton.org_id against the MPC ClubNumber. This is because the details returned by the MPC for a player includes the home club id (not number), and it is not clear how to associate the id with a number other than through the club name.

organisations.views.club_menu_tabs.members.report_all_csv(request, club_id)[source]#

CSV of all members. We can’t use the decorator as I can’t get HTMX to treat this as a CSV

organisations.views.club_menu_tabs.results module#

organisations.views.club_menu_tabs.results.upload_results_file_valid(request, form, club)[source]#

sub of upload_results_file_htmx. This is separated out so the tests can call it directly

organisations.views.club_menu_tabs.sessions module#

organisations.views.club_menu_tabs.settings module#

organisations.views.club_menu_tabs.settings.template_preview_htmx(request)[source]#

Preview a template as user creates it

organisations.views.club_menu_tabs.utils module#

organisations.views.club_menu_tabs.utils.get_club_members_from_system_number_list(system_numbers, club, sort_option='first_desc')[source]#

Takes a list of system numbers and returns the members for a given club

organisations.views.club_menu_tabs.utils.get_members_balance(club: Organisation)[source]#

Get the total balance for members of this club

organisations.views.club_menu_tabs.utils.get_members_for_club(club, sort_option='first_desc')[source]#

Gets all of the members and unregistered users for a club

Module contents#