mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-16 03:03:21 +00:00
22 lines
433 B
Python
22 lines
433 B
Python
from rest_framework import serializers
|
|
|
|
from club.models import Club
|
|
|
|
from api.views import RightModelViewSet
|
|
|
|
|
|
class ClubSerializer(serializers.ModelSerializer):
|
|
|
|
class Meta:
|
|
model = Club
|
|
fields = ('id', 'name', 'unix_name', 'address', 'members')
|
|
|
|
|
|
class ClubViewSet(RightModelViewSet):
|
|
"""
|
|
Manage Clubs (api/v1/club/)
|
|
"""
|
|
|
|
serializer_class = ClubSerializer
|
|
queryset = Club.objects.all()
|