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

21 lines
578 B
Python
Raw Normal View History

2018-11-26 21:09:04 +00:00
"""passbook Core Application forms"""
from django import forms
2018-12-09 22:05:55 +00:00
from passbook.core.models import Application, Provider
2018-11-26 21:09:04 +00:00
class ApplicationForm(forms.ModelForm):
"""Application Form"""
2018-12-09 22:05:55 +00:00
provider = forms.ModelChoiceField(queryset=Provider.objects.all().select_subclasses())
2018-11-26 21:09:04 +00:00
class Meta:
model = Application
fields = ['name', 'launch_url', 'icon_url', 'rules', 'provider', 'skip_authorization']
widgets = {
'name': forms.TextInput(),
'launch_url': forms.TextInput(),
'icon_url': forms.TextInput(),
}