mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-30 04:54:23 +00:00
21 lines
386 B
Python
21 lines
386 B
Python
from rest_framework import serializers
|
|
|
|
from core.models import RealGroup
|
|
|
|
from api.views import RightModelViewSet
|
|
|
|
|
|
class GroupSerializer(serializers.ModelSerializer):
|
|
|
|
class Meta:
|
|
model = RealGroup
|
|
|
|
|
|
class GroupViewSet(RightModelViewSet):
|
|
"""
|
|
Manage Groups (api/v1/group/)
|
|
"""
|
|
|
|
serializer_class = GroupSerializer
|
|
queryset = RealGroup.objects.all()
|