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.
authentik/passbook/core/api/applications.py

32 lines
721 B
Python
Raw Normal View History

2019-10-28 13:44:46 +00:00
"""Application API Views"""
from rest_framework.serializers import ModelSerializer
from rest_framework.viewsets import ModelViewSet
from passbook.core.models import Application
class ApplicationSerializer(ModelSerializer):
2019-10-28 13:44:46 +00:00
"""Application Serializer"""
class Meta:
model = Application
2019-12-31 11:51:16 +00:00
fields = [
"pk",
"name",
"slug",
"provider",
"meta_launch_url",
"meta_icon_url",
"meta_description",
"meta_publisher",
2019-12-31 11:51:16 +00:00
"policies",
]
class ApplicationViewSet(ModelViewSet):
2019-10-28 13:44:46 +00:00
"""Application Viewset"""
queryset = Application.objects.all()
serializer_class = ApplicationSerializer