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 13:44:46 +00:00
|
|
|
"""Application API Views"""
|
2019-10-28 13:27:43 +00:00
|
|
|
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"""
|
2019-10-28 13:27:43 +00:00
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
|
|
|
model = Application
|
2019-12-31 11:51:16 +00:00
|
|
|
fields = [
|
|
|
|
"pk",
|
|
|
|
"name",
|
|
|
|
"slug",
|
2020-02-20 12:45:22 +00:00
|
|
|
"skip_authorization",
|
2020-05-15 20:15:01 +00:00
|
|
|
"outlet",
|
2020-02-20 12:45:22 +00:00
|
|
|
"meta_launch_url",
|
|
|
|
"meta_icon_url",
|
|
|
|
"meta_description",
|
|
|
|
"meta_publisher",
|
2019-12-31 11:51:16 +00:00
|
|
|
"policies",
|
|
|
|
]
|
2019-10-28 13:27:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ApplicationViewSet(ModelViewSet):
|
2019-10-28 13:44:46 +00:00
|
|
|
"""Application Viewset"""
|
2019-10-28 13:27:43 +00:00
|
|
|
|
|
|
|
queryset = Application.objects.all()
|
|
|
|
serializer_class = ApplicationSerializer
|