django-orchestra/orchestra/apps/users/api.py

16 lines
425 B
Python
Raw Normal View History

2014-05-08 16:59:35 +00:00
from django.contrib.auth import get_user_model
from rest_framework import viewsets
from orchestra.api import router, SetPasswordApiMixin
from orchestra.apps.accounts.api import AccountApiMixin
from .serializers import UserSerializer
class UserViewSet(AccountApiMixin, SetPasswordApiMixin, viewsets.ModelViewSet):
model = get_user_model()
serializer_class = UserSerializer
router.register(r'users', UserViewSet)