Skip to content
Snippets Groups Projects
Forked from KIF / AKPlanning
505 commits behind the upstream repository.
  • Nadja Geisler's avatar
    a93d0d59
    introduce REST API · a93d0d59
    Nadja Geisler authored and Benjamin Hättasch's avatar Benjamin Hättasch committed
    add djangorestframework
    add serializers for select models
    create api urls
    extend EventSlugMixin to work for list and create methods
    create list and retrieve viewsets for select models
    include AKModel URLS into main app
    a93d0d59
    History
    introduce REST API
    Nadja Geisler authored and Benjamin Hättasch's avatar Benjamin Hättasch committed
    add djangorestframework
    add serializers for select models
    create api urls
    extend EventSlugMixin to work for list and create methods
    create list and retrieve viewsets for select models
    include AKModel URLS into main app
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
serializers.py 840 B
from rest_framework import serializers

from AKModel.models import AK, Room, AKSlot, AKTrack, AKCategory, AKOwner


class AKOwnerSerializer(serializers.ModelSerializer):
    class Meta:
        model = AKOwner
        fields = '__all__'


class AKCategorySerializer(serializers.ModelSerializer):
    class Meta:
        model = AKCategory
        fields = '__all__'


class AKTrackSerializer(serializers.ModelSerializer):
    class Meta:
        model = AKTrack
        fields = '__all__'


class AKSerializer(serializers.ModelSerializer):
    class Meta:
        model = AK
        fields = '__all__'


class RoomSerializer(serializers.ModelSerializer):
    class Meta:
        model = Room
        fields = '__all__'


class AKSlotSerializer(serializers.ModelSerializer):
    class Meta:
        model = AKSlot
        fields = '__all__'