django-orchestra-test/orchestra/apps/systemusers/api.py

17 lines
467 B
Python

from rest_framework import viewsets
from orchestra.api import router, SetPasswordApiMixin
from orchestra.apps.accounts.api import AccountApiMixin
from .models import SystemUser
from .serializers import SystemUserSerializer
class SystemUserViewSet(AccountApiMixin, SetPasswordApiMixin, viewsets.ModelViewSet):
model = SystemUser
serializer_class = SystemUserSerializer
filter_fields = ('username',)
router.register(r'systemusers', SystemUserViewSet)