results package

Contents

results package#

Subpackages#

Submodules#

results.admin module#

Generated by utils/cgit/cgit_util_generate_admin_file on 2022-05-03 08:32:37.897641

class results.admin.PlayerSummaryResultAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model PlayerSummaryResult

autocomplete_fields = ['results_file']#
property media#
class results.admin.ResultsFileAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model ResultsFile

autocomplete_fields = ['uploaded_by', 'organisation']#
property media#
search_fields = ('results_file',)#

results.apps module#

class results.apps.ResultsConfig(app_name, app_module)[source]#

Bases: AppConfig

name = 'results'#

results.models module#

class results.models.PlayerSummaryResult(*args, **kwargs)[source]#

Bases: Model

Short summary of a players results, for high level views

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

event_name#

name of event

get_next_by_result_date(*, field=<django.db.models.fields.DateField: result_date>, is_next=True, **kwargs)#
get_previous_by_result_date(*, field=<django.db.models.fields.DateField: result_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>#
partner_or_team_name#

who was their partner or team for this event

percentage#

optional what percentage they got

player_system_number#

system number of player who played in this event

position#

optional - where the player finished

result_date#

date event took place

result_string#

de-normalised string to show as summary

results_file#

linked results file - may need to make this optional later depending on whether we generate files when we do scoring ourselves

results_file_id#
class results.models.ResultsFile(*args, **kwargs)[source]#

Bases: Model

Initially this supports clubs uploading files in USEBIO format. This may need to be extended for other formats and we will also need to decide if we use files at all when/if we put scoring into Cobalt

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

class ResultsStatus(*values)[source]#

Bases: TextChoices

PENDING = 'PE'#
PUBLISHED = 'PU'#
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.

event_date#

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

filename()[source]#
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)#
get_status_display(*, field=<django.db.models.fields.CharField: status>)#
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 a ForwardManyToOneDescriptor instance.

organisation_id#
playersummaryresult_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.

results_file#

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
status#

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

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

uploaded_by_id#

results.urls module#

Module contents#