Views¶
AthleteInformationViewSet¶
-
class
results.views.athletes.AthleteInformationViewSet(**kwargs)¶ API endpoint for athlete information.
Only public information is available for users without staff or superuser status.
list: Returns a list of all the existing athletes information.
retrieve: Returns the given athlete information.
create: Creates a new athlete information instance.
update: Updates a given athlete information.
partial_update: Updates a given athlete information.
destroy: Removes the given athlete information.
-
dispatch(request, *args, **kwargs)¶ .dispatch() is pretty much the same as Django’s regular dispatch, but with extra hooks for startup, finalize, and exception handling.
-
get_queryset()¶ Restricts the returned information to public values, unless user is staff or superuser.
-
serializer_class¶ alias of
results.serializers.athletes.AthleteInformationSerializer
-
AthleteViewSet¶
-
class
results.views.athletes.AthleteViewSet(**kwargs)¶ API endpoint for athletes.
Model:
models.athletes.AthleteDate of birth and gender are only available for staff of superusers. They are also masked for everyone not in UNMASKED_ATHLETE_USERS settings group, except in POST requests.
Creation of athletes in external organizations is allowed for any logged in user.
list: Returns a list of all the existing athletes.
retrieve: Returns the given athlete.
create: Creates a new athlete instance.
update: Updates a given athlete.
partial_update: Updates a given athlete.
destroy: Removes the given athlete.
-
dispatch(request, *args, **kwargs)¶ .dispatch() is pretty much the same as Django’s regular dispatch, but with extra hooks for startup, finalize, and exception handling.
-
get_serializer_class()¶ Returns limited information unless user is staff or superuser.
-
pagination_class¶
-
serializer_class¶
-
CategoryViewSet¶
-
class
results.views.categories.CategoryViewSet(**kwargs)¶ API endpoint for categories.
list: Returns a list of all the existing categories.
retrieve: Returns the given category.
create: Creates a new category instance.
update: Updates a given category.
partial_update: Updates a given category.
destroy: Removes the given category.
-
serializer_class¶
-
DivisionViewSet¶
-
class
results.views.categories.DivisionViewSet(**kwargs)¶ API endpoint for divisions.
list: Returns a list of all the existing divisions.
retrieve: Returns the given division.
create: Creates a new division instance.
update: Updates a given division.
partial_update: Updates a given division.
destroy: Removes the given division.
-
serializer_class¶
-
CompetitionLayoutViewSet¶
-
class
results.views.competitions.CompetitionLayoutViewSet(**kwargs)¶ API endpoint for competition layouts.
list: Returns a list of all the existing competition layouts.
retrieve: Returns the given competition layout.
create: Creates a new competition layout instance.
update: Updates a given competition layout.
partial_update: Updates a given competition layout.
destroy: Removes the given competition layout.
-
serializer_class¶ alias of
results.serializers.competitions.CompetitionLayoutSerializer
-
CompetitionLevelViewSet¶
-
class
results.views.competitions.CompetitionLevelViewSet(**kwargs)¶ API endpoint for competition levels.
list: Returns a list of all the existing competition levels.
retrieve: Returns the given competition level.
create: Creates a new competition level instance.
update: Updates a given competition level.
partial_update: Updates a given competition level.
destroy: Removes the given competition level.
-
serializer_class¶ alias of
results.serializers.competitions.CompetitionLevelSerializer
-
CompetitionResultTypeViewSet¶
-
class
results.views.competitions.CompetitionResultTypeViewSet(**kwargs)¶ API endpoint for competition result types.
list: Returns a list of all the existing competition result types.
retrieve: Returns the given competition result type.
create: Creates a new competition result type instance.
update: Updates a given competition result type.
partial_update: Updates a given competition result type.
destroy: Removes the given competition result type.
-
serializer_class¶ alias of
results.serializers.competitions.CompetitionResultTypeSerializer
-
CompetitionTypeViewSet¶
-
class
results.views.competitions.CompetitionTypeViewSet(**kwargs)¶ API endpoint for competition types.
list: Returns a list of all the existing competition types.
retrieve: Returns the given competition type.
create: Creates a new competition type instance.
update: Updates a given competition type.
partial_update: Updates a given competition type.
destroy: Removes the given competition type.
-
serializer_class¶ alias of
results.serializers.competitions.CompetitionTypeSerializer
-
CompetitionViewSet¶
-
class
results.views.competitions.CompetitionViewSet(**kwargs)¶ API endpoint for competitions.
list: Returns a list of all the existing competitions.
retrieve: Returns the given competition.
create: Creates a new competition instance.
update: Updates a given competition.
partial_update: Updates a given competition.
destroy: Removes the given competition.
-
dispatch(request, *args, **kwargs)¶ .dispatch() is pretty much the same as Django’s regular dispatch, but with extra hooks for startup, finalize, and exception handling.
-
filterset_class¶ alias of
CompetitionFilter
-
get_queryset()¶ Restricts the returned information to public competitions, unless user is staff or superuser or user is representing the organizer of the competition.
-
pagination_class¶
-
serializer_class¶ alias of
results.serializers.competitions.CompetitionSerializer
-
EventFilter¶
-
class
results.views.events.EventFilter(data=None, queryset=None, *, request=None, prefix=None)¶ Custom filters for the event.
EventViewSet¶
-
class
results.views.events.EventViewSet(**kwargs)¶ API endpoint for events.
list: Returns a list of all the existing events.
retrieve: Returns the given event.
create: Creates a new event instance.
update: Updates a given event.
partial_update: Updates a given event.
destroy: Removes the given event.
-
dispatch(request, *args, **kwargs)¶ .dispatch() is pretty much the same as Django’s regular dispatch, but with extra hooks for startup, finalize, and exception handling.
-
filterset_class¶ alias of
EventFilter
-
get_queryset()¶ Restricts the returned information to public events, unless user is staff or superuser or user is representing the organizer of the event.
-
pagination_class¶
-
serializer_class¶
-
AreaViewSet¶
-
class
results.views.organizations.AreaViewSet(**kwargs)¶ API endpoint for organizational areas.
list: Returns a list of all the existing areas.
retrieve: Returns the given area.
create: Creates a new area instance.
update: Updates a given area.
partial_update: Updates a given area.
destroy: Removes the given area.
-
serializer_class¶
-
OrganizationViewSet¶
-
class
results.views.organizations.OrganizationViewSet(**kwargs)¶ API endpoint for organizations.
list: Returns a list of all the existing organizations.
retrieve: Returns the given organization.
create: Creates a new organization instance.
update: Updates a given organization.
partial_update: Updates a given organization.
destroy: Removes the given organization.
-
dispatch(request, *args, **kwargs)¶ .dispatch() is pretty much the same as Django’s regular dispatch, but with extra hooks for startup, finalize, and exception handling.
-
filterset_class¶ alias of
OrganizationFilter
-
get_queryset()¶ Optionally restricts returned results to user’s managed organizations.
-
serializer_class¶ alias of
results.serializers.organizations.OrganizationSerializer
-
RecordLevelViewSet¶
-
class
results.views.records.RecordLevelViewSet(**kwargs)¶ API endpoint for record levels.
list: Returns a list of all the existing record levels.
retrieve: Returns the given record level.
create: Creates a new record level instance.
update: Updates a given record level.
partial_update: Updates a given record level.
destroy: Removes the given record level.
-
get_queryset()¶ Setup eager loading of linked models
-
serializer_class¶
-
RecordList¶
-
class
results.views.records.RecordList(**kwargs)¶ API endpoint for retrieving record list.
retrieve: Returns the record list, filtered by fields.
-
filterset_class¶ alias of
RecordListFilter
-
get_queryset()¶ Setup eager loading of linked models
-
serializer_class¶ alias of
results.serializers.records_list.RecordListSerializer
-
RecordViewSet¶
-
class
results.views.records.RecordViewSet(**kwargs)¶ API endpoint for records.
list: Returns a list of all the existing records.
retrieve: Returns the given record.
create: Creates a new record instance.
update: Updates a given record.
partial_update: Updates a given record.
destroy: Removes the given record.
-
serializer_class¶
-
ResultDetailViewSet¶
-
class
results.views.results.ResultDetailViewSet(**kwargs)¶ API endpoint for retrieving detailed result information.
retrieve: Returns the detailed information, including partial results, for a single result.
-
serializer_class¶ alias of
results.serializers.results_detail.ResultDetailSerializer
-
ResultList¶
-
class
results.views.results.ResultList(**kwargs)¶ API endpoint for retrieving result lists.
group_results returns limited information, including only athlete and result.
retrieve: Returns the result list
-
get_queryset()¶ Custom filtering with query parameters.
-
pagination_class¶
-
serializer_class¶ alias of
results.serializers.results.ResultLimitedSerializer
-
ResultPartialViewSet¶
-
class
results.views.results.ResultPartialViewSet(**kwargs)¶ API endpoint for partial results.
list: Returns a list of all the existing partial results.
retrieve: Returns the given partial result.
create: Creates a new partial result instance.
update: Updates a given partial result.
partial_update: Updates a given partial result.
destroy: Removes the given partial result.
-
serializer_class¶ alias of
results.serializers.results.ResultPartialSerializer
-
ResultViewSet¶
-
class
results.views.results.ResultViewSet(**kwargs)¶ API endpoint for results.
list: Returns a list of all the existing results.
retrieve: Returns the given result.
create: Creates a new result instance.
update: Updates a given result.
partial_update: Updates a given result.
destroy: Removes the given result.
-
get_queryset()¶ Prefetch partial results
-
serializer_class¶
-
SportViewSet¶
-
class
results.views.sports.SportViewSet(**kwargs)¶ API endpoint for sports.
list: Returns a list of all the existing sports.
retrieve: Returns the given sport.
create: Creates a new sport instance.
update: Updates a given sport.
partial_update: Updates a given sport.
destroy: Removes the given sport.