Fakultas Ilmu Komputer UI

vacancies.py 462 Bytes
Newer Older
1
2
3
4
5
6
7
from rest_framework import viewsets

from core.models.vacancies import Vacancy, Application
from core.serializers.vacancies import VacancySerializer, ApplicationSerializer


class VacancyViewSet(viewsets.ModelViewSet):
8
    queryset = Vacancy.objects.all().filter(verified=True)
9
10
11
12
13
14
15
16
17
18
19
20
    serializer_class = VacancySerializer


class ApplicationViewSet(viewsets.ModelViewSet):
    queryset = Application.objects.all()
    serializer_class = ApplicationSerializer