thaliawebsite.api package

Submodules

thaliawebsite.api.authentication module

class thaliawebsite.api.authentication.APIv1TokenAuthentication[source]

Bases: rest_framework.authentication.TokenAuthentication

Custom token authentication class that only works for API v1.

authenticate(request)[source]

Authenticate the request and return a two-tuple of (user, token).

thaliawebsite.api.openapi module

class thaliawebsite.api.openapi.OAuthAutoSchema(tags=None, operation_id_base=None, component_name=None)[source]

Bases: rest_framework.schemas.openapi.AutoSchema

get_operation(path, method)[source]
get_operation_id(path, method)[source]

Compute an operation ID from the view type and get_operation_id_base method.

class thaliawebsite.api.openapi.OAuthSchemaGenerator(title=None, url=None, description=None, patterns=None, urlconf=None, version=None)[source]

Bases: rest_framework.schemas.openapi.SchemaGenerator

get_schema(request=None, public=False)[source]

Generate a OpenAPI schema.

thaliawebsite.api.pagination module

Custom API pagination classes.

class thaliawebsite.api.pagination.APIv2LimitOffsetPagination[source]

Bases: rest_framework.pagination.LimitOffsetPagination

Pagination class that uses LimitOffsetPagination and sets the default value for the pagination size to None for API v1.

get_limit(request)[source]

thaliawebsite.api.services module

thaliawebsite.api.services.create_image_thumbnail_dict(request, file, placeholder='', size_small='150x150', size_medium='300x300', size_large='1024x768', fit_small=True, fit_medium=True, fit_large=True)[source]

thaliawebsite.api.urls module

Concrexit API url schemes.