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/admin/views/applications.py

22 lines
601 B
Python
Raw Normal View History

2018-11-11 12:41:48 +00:00
"""passbook application administration"""
from django.views.generic import CreateView, ListView
2018-11-11 12:41:48 +00:00
2018-11-16 08:10:35 +00:00
from passbook.admin.mixins import AdminRequiredMixin
2018-11-11 12:41:48 +00:00
from passbook.core.models import Application
2018-11-16 08:10:35 +00:00
class ApplicationListView(AdminRequiredMixin, ListView):
"""List all applications"""
2018-11-11 12:41:48 +00:00
model = Application
2018-11-16 08:10:35 +00:00
template_name = 'administration/application/list.html'
2018-11-11 12:41:48 +00:00
2018-11-16 08:10:35 +00:00
class ApplicationCreateView(AdminRequiredMixin, CreateView):
"""Create new application"""
2018-11-11 12:41:48 +00:00
model = Application
template_name = 'administration/application/create.html'
fields = ['name', 'launch_url', 'icon_url']