from django.shortcuts import render
from apps.utils.viewsets import CustomModelViewSet
from apps.rem.models import Project
from apps.rem.serializers import ProjectSerializer, ProjectUpdateSerializer
# Create your views here.

class ProjectViewSet(CustomModelViewSet):
    queryset = Project.objects.all()
    serializer_class = ProjectSerializer
    update_serializer_class = ProjectUpdateSerializer
    select_related_fields = ['leader']
    search_fields = ["name", "description", "leader__name"]