Glossary app serializers

Glossary serializer.

class GlossarySerializer(*args, **kwargs)

Bases: ModelSerializer

Glossary serializer.

class Meta

Bases: object

Serializer settings.

model

alias of Glossary

class GlossaryParamsSerializer(*args, **kwargs)

Bases: ModelSerializer

Glossary Exercise Parameters serializer.

class Meta

Bases: object

Serializer settings.

model

alias of GlossaryParams

exclude = ['id', 'user']

Exclude fields (list[str]).

create(validated_data: dict) GlossaryParams

Update or create the user glossary exercise parameters.

class GlossaryCategorySerializer(*args, **kwargs)

Bases: ModelSerializer

Glossary Category serializer.

alias

Field alias pk (int).

humanly

Field alias pk (str).

class Meta

Bases: object

Serializer settings.

model

alias of GlossaryCategory

fields = ['alias', 'humanly']

Fields (list[str]).

classmethod get_alias(obj: Model) int

Add alias as name of pk field.