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
organisation_transactions_filtered_data()
organisation_transactions_filtered_data_all()
organisation_transactions_filtered_data_combined()
organisation_transactions_filtered_data_congresses()
organisation_transactions_filtered_data_events()
organisation_transactions_filtered_data_sessions()
organisation_transactions_filtered_data_txntype()
pay_member_from_organisation()
top_up_member_from_organisation()
- 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
Submodules#
organisations.views.admin module#
- organisations.views.admin.add_club_defaults(club: Organisation)[source]#
Add sensible default values when we create a new club
- organisations.views.admin.admin_add_club(request)[source]#
Add a club to the system. For State or ABF Administrators
NOTE: For now the club must be defined in the Masterpoints Centre already
- organisations.views.admin.admin_club_rbac(request, club_id)[source]#
Manage RBAC basic set up for a Club
This doesn’t control who gets access - clubs can do that themselves, this controls whether it is basic or advanced RBAC configuration. It is the RBAC structure, not the content.
- organisations.views.admin.admin_club_rbac_add_advanced(request, club_id)[source]#
Manage RBAC advanced set up for a Club
This doesn’t control who gets access - clubs can do that themselves, this controls whether it is basic or advanced RBAC configuration. It is the RBAC structure, not the content.
- organisations.views.admin.admin_club_rbac_add_basic(request, club_id)[source]#
Manage RBAC basic set up for a Club
This doesn’t control who gets access - clubs can do that themselves, this controls whether it is basic or advanced RBAC configuration. It is the RBAC structure, not the content.
- organisations.views.admin.admin_club_rbac_convert_advanced_to_basic(request, club_id)[source]#
Change rbac setup for a club advanced -> basic
- organisations.views.admin.admin_club_rbac_convert_advanced_to_basic_sub(club)[source]#
Change rbac from advanced to basic. Do the actual changes. Does not check for permissions, the calling function must handle that.
- Parameters:
club – Organisation
- Returns:
Boolean - success or failure Str - error message or None
- organisations.views.admin.admin_club_rbac_convert_basic_to_advanced(request, club_id)[source]#
Change rbac setup for a club basic -> advanced
- organisations.views.admin.admin_club_rbac_convert_basic_to_advanced_sub(club)[source]#
Change rbac from basic to advanced. Do the actual changes. Does not check for permissions, the calling function must handle that.
- Parameters:
club – Organisation
- Returns:
Boolean - success or failure Str - error message or None
- organisations.views.admin.admin_list_clubs(request)[source]#
List Clubs in the system. For State or ABF Administrators. Modified to show all organisations, not just clubs
- organisations.views.admin.convert_manual_club_to_automatic(request, club_id)[source]#
This is a temporary function to convert clubs that were created before club admin to be set up as “normal” clubs.
If you are looking at this in the future, you can probably delete it.
organisations.views.ajax module#
- organisations.views.ajax.club_name_search_htmx(request)[source]#
Get list of matching club names from Masterpoints centre
- organisations.views.ajax.get_club_details_htmx(request)[source]#
Get details about club from Masterpoints centre This request is called by HTMX and returns HTML, not json
organisations.views.general module#
- organisations.views.general.club_staff(user)[source]#
Used by dashboard. Returns the first club found that this user is a staff member for or None
Note: Staff with orgs.org.all rather than orgs.org.<model_id>.all will not get an icon (returns None)
- Parameters:
user – User objects
- Returns:
If not None then model_id is the first organisation that this user has access to
- Return type:
model_id
- organisations.views.general.compare_form_with_mpc(form, club)[source]#
Compare data on this form with values from the Masterpoints Centre and flag any differences
- organisations.views.general.generic_org_search_htmx(request)[source]#
basic search for organisation by name
We accept a few parameters passed in through hx-vars:
hidden_id_field: field to put the org id into display_name: field to put the name of the org into return_trigger: trigger to call when we return
- organisations.views.general.get_active_club_statistics()[source]#
Returns active and inactive club counts by state/territory
- organisations.views.general.get_club_data_from_masterpoints_centre(club_number)[source]#
Get data about a club from the Masterpoints Centre
- Parameters:
club_number – ABF club number
Returns: dictionary of values
- organisations.views.general.get_org_statistics()[source]#
return stats on organisations. called by utils statistics
- organisations.views.general.get_rbac_model_for_state(state)[source]#
Take in a state name e.g. NSW and return the model that maps to that organisation. Assumes one state organisation per state.
- organisations.views.general.is_admin_for_organisation(user, club)[source]#
Boolean. Does this user have admin access to this club
- organisations.views.general.org_balance(org, text=None)[source]#
return organisation balance. If balance is zero return 0.0 unless text is True, then return “Nil”
- organisations.views.general.org_edit(request, org_id)[source]#
Edit details about an organisation OLD - REMOVE ONCE NEW CLUB ADMIN IS DONE
- Parameters:
edit (org_id - organisation to)
- Returns:
HttpResponse - page to edit organisation