club_sessions package

Contents

club_sessions package#

Subpackages#

Submodules#

club_sessions.admin module#

Generated by utils/cgit/cgit_util_generate_admin_file on 2022-01-24 12:15:50.068914

class club_sessions.admin.MemberOrganisationLinkAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model MemberOrganisationLink

autocomplete_fields = ['member_transaction', 'organisation_transaction']#
property media#
class club_sessions.admin.SessionAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model Session

autocomplete_fields = ['director', 'session_type', 'venue']#
property media#
search_fields = ['director', 'venue']#
class club_sessions.admin.SessionEntryAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model SessionEntry

autocomplete_fields = ['session', 'org_tran', 'member_tran', 'payment_method']#
property media#
search_fields = ['player']#
class club_sessions.admin.SessionMiscPaymentAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model SessionMiscPayment

autocomplete_fields = ['session_entry']#
property media#
search_fields = ['system_number']#
class club_sessions.admin.SessionTypeAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model SessionType

autocomplete_fields = ['organisation']#
property media#
search_fields = ['name', 'organisation']#
class club_sessions.admin.SessionTypePaymentMethodAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model SessionTypePaymentMethod

autocomplete_fields = ['session_type', 'payment_method']#
property media#
search_fields = ['name', 'organisation']#
class club_sessions.admin.SessionTypePaymentMethodMembershipAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model SessionTypePaymentMethodMembership

autocomplete_fields = ['session_type_payment_method', 'membership']#
property media#
search_fields = ['membership']#

club_sessions.apps module#

class club_sessions.apps.ClubSessionsConfig(app_name, app_module)[source]#

Bases: AppConfig

default_auto_field = 'django.db.models.BigAutoField'#
name = 'club_sessions'#

club_sessions.forms module#

class club_sessions.forms.FileImportForm(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

Session file upload form

base_fields = {'file': <django.forms.fields.FileField object>}#
declared_fields = {'file': <django.forms.fields.FileField object>}#
property media#

Return all media required to render the widgets on this form.

class club_sessions.forms.SessionForm(*args, **kwargs)[source]#

Bases: ModelForm

Session Form

class Meta[source]#

Bases: object

fields = ['director', 'session_type', 'session_date', 'description', 'venue', 'time_of_day', 'additional_session_fee', 'additional_session_fee_reason', 'default_secondary_payment_method', 'director_notes']#
model#

alias of Session

base_fields = {'additional_session_fee': <django.forms.fields.DecimalField object>, 'additional_session_fee_reason': <django.forms.fields.CharField object>, 'default_secondary_payment_method': <django.forms.models.ModelChoiceField object>, 'description': <django.forms.fields.CharField object>, 'director': <django.forms.models.ModelChoiceField object>, 'director_notes': <django.forms.fields.CharField object>, 'session_date': <django.forms.fields.DateField object>, 'session_type': <django.forms.models.ModelChoiceField object>, 'time_of_day': <django.forms.fields.TypedChoiceField object>, 'venue': <django.forms.models.ModelChoiceField object>}#
clean_description()[source]#

remove “; from description in case someone deliberately wants it to fail. Least likely code to ever run

clean_session_type()[source]#

validate session type - don’t allow changes if payments made

declared_fields = {'director_notes': <django.forms.fields.CharField object>}#
property media#

Return all media required to render the widgets on this form.

class club_sessions.forms.UserSessionForm(*args, **kwargs)[source]#

Bases: Form

Form for the screen to allow editing a single user in a session Has a bit of a mixture of things on it from multiple places

base_fields = {'fee': <django.forms.fields.DecimalField object>, 'is_paid': <django.forms.fields.BooleanField object>, 'payment_method': <django.forms.fields.ChoiceField object>}#
declared_fields = {'fee': <django.forms.fields.DecimalField object>, 'is_paid': <django.forms.fields.BooleanField object>, 'payment_method': <django.forms.fields.ChoiceField object>}#
property media#

Return all media required to render the widgets on this form.

club_sessions.models module#

class club_sessions.models.MasterSessionType(*values)[source]#

Bases: TextChoices

Master list of different types of session that are supported The idea with this is that different things will happen depending upon the master_session_type. Currently nothing happens so this is just set to DUPLICATE.

DUPLICATE = 'DP'#
MULTI_SESSION = 'MS'#
WORKSHOP = 'WS'#
class club_sessions.models.Session(*args, **kwargs)[source]#

Bases: Model

Basic definition of a session of bridge

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

class SessionStatus(*values)[source]#

Bases: TextChoices

COMPLETE = 'CO'#
CREDITS_PROCESSED = 'BC'#
DATA_LOADED = 'LD'#
additional_session_fee#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

additional_session_fee_reason#

allows all users to be charged an additional fee for this session

default_secondary_payment_method#

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 a ForwardManyToOneDescriptor instance.

default_secondary_payment_method_id#
description#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

director#

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 a ForwardManyToOneDescriptor instance.

director_id#
director_notes#

Comments on the session

get_next_by_session_date(*, field=<django.db.models.fields.DateField: session_date>, is_next=True, **kwargs)#
get_previous_by_session_date(*, field=<django.db.models.fields.DateField: session_date>, is_next=False, **kwargs)#
get_status_display(*, field=<django.db.models.fields.CharField: status>)#
get_time_of_day_display(*, field=<django.db.models.fields.CharField: time_of_day>)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

import_messages#

A place to store the messages generated when we imported the file (if we did)

objects = <django.db.models.manager.Manager object>#
session_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

session_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 a ForwardManyToOneDescriptor instance.

session_type_id#
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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

status#

shows whether this session has had payments made and is now closed

time_of_day#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

venue#

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 a ForwardManyToOneDescriptor instance.

venue_id#
class club_sessions.models.SessionEntry(*args, **kwargs)[source]#

Bases: Model

A player who is playing in a session

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

fee#

default to -99 so we know it hasn’t been set. Zero is a valid fee to set it to

get_seat_display(*, field=<django.db.models.fields.CharField: seat>)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_paid#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

member_tran#

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 a ForwardManyToOneDescriptor instance.

member_tran_id#
objects = <django.db.models.manager.Manager object>#
org_tran#

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 a ForwardManyToOneDescriptor instance.

org_tran_id#
pair_team_number#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

payment_method#

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 a ForwardManyToOneDescriptor instance.

payment_method_id#
player_name_from_file#

Player name as it appears on the file. We usually use the system_number, but for non-ABF members we need this

save(*args, **kwargs)[source]#

We add the seat number internal on save, so we can load from database in order NSEW

seat#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

seat_number_internal#

seat_number_internal is used to sort NSEW in order

session#

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 a ForwardManyToOneDescriptor instance.

session_id#
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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

system_number#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class club_sessions.models.SessionMiscPayment(*args, **kwargs)[source]#

Bases: Model

holds miscellaneous payments associated with a session. These are not paid until the payments for this session are all processed.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

class TypeOfPayment(*values)[source]#

Bases: TextChoices

OTHER = 'OT'#
TOP_UP = 'TU'#
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.

get_payment_type_display(*, field=<django.db.models.fields.CharField: payment_type>)#
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>#
payment_made#

Has this payment been processed. We use a different name from SessionEntry to help with searching the code

payment_method#

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 a ForwardManyToOneDescriptor instance.

payment_method_id#
payment_type#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

session_entry#

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 a ForwardManyToOneDescriptor instance.

session_entry_id#
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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class club_sessions.models.SessionType(*args, **kwargs)[source]#

Bases: Model

Specific club session types

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

get_master_session_type_display(*, field=<django.db.models.fields.CharField: master_session_type>)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

master_session_type#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 a ForwardManyToOneDescriptor 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 a ReverseManyToOneDescriptor 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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

status#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class club_sessions.models.SessionTypePaymentMethod(*args, **kwargs)[source]#

Bases: Model

Payment types for a session type

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.

objects = <django.db.models.manager.Manager object>#
payment_method#

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 a ForwardManyToOneDescriptor instance.

payment_method_id#
session_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 a ForwardManyToOneDescriptor instance.

session_type_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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class club_sessions.models.SessionTypePaymentMethodMembership(*args, **kwargs)[source]#

Bases: Model

Links a session type (and payment method) to a membership type and sets the fee

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

fee#

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.

membership#

This either holds a link to a membership type or can be blank to signify the rate for non-members

membership_id#
objects = <django.db.models.manager.Manager object>#
session_type_payment_method#

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 a ForwardManyToOneDescriptor instance.

session_type_payment_method_id#
class club_sessions.models.TimeOfDay(*values)[source]#

Bases: TextChoices

Master list of session names, may need to be changed to a list that clubs can edit

ALL_DAY = 'AL'#
AM = 'AM'#
EVENING = 'EV'#
PM = 'PM'#

club_sessions.urls module#

Module contents#