This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2019-10-28 16:55:36 +00:00
|
|
|
"""DummyFactor API Views"""
|
|
|
|
from rest_framework.serializers import ModelSerializer
|
|
|
|
from rest_framework.viewsets import ModelViewSet
|
|
|
|
|
|
|
|
from passbook.factors.dummy.models import DummyFactor
|
|
|
|
|
|
|
|
|
|
|
|
class DummyFactorSerializer(ModelSerializer):
|
|
|
|
"""DummyFactor Serializer"""
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
|
|
|
model = DummyFactor
|
2019-11-07 09:30:22 +00:00
|
|
|
fields = ['pk', 'name', 'slug', 'order', 'enabled']
|
2019-10-28 16:55:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DummyFactorViewSet(ModelViewSet):
|
|
|
|
"""DummyFactor Viewset"""
|
|
|
|
|
|
|
|
queryset = DummyFactor.objects.all()
|
|
|
|
serializer_class = DummyFactorSerializer
|