core: remove policies from application form

This commit is contained in:
Jens Langhammer 2020-05-16 20:48:45 +02:00
parent 802d568273
commit db26ce808e
2 changed files with 1 additions and 7 deletions

View File

@ -1,6 +1,5 @@
"""passbook Core Application forms""" """passbook Core Application forms"""
from django import forms from django import forms
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from passbook.core.models import Application, Provider from passbook.core.models import Application, Provider
@ -26,14 +25,12 @@ class ApplicationForm(forms.ModelForm):
"meta_icon_url", "meta_icon_url",
"meta_description", "meta_description",
"meta_publisher", "meta_publisher",
"policies",
] ]
widgets = { widgets = {
"name": forms.TextInput(), "name": forms.TextInput(),
"meta_launch_url": forms.TextInput(), "meta_launch_url": forms.TextInput(),
"meta_icon_url": forms.TextInput(), "meta_icon_url": forms.TextInput(),
"meta_publisher": forms.TextInput(), "meta_publisher": forms.TextInput(),
"policies": FilteredSelectMultiple(_("policies"), False),
} }
labels = { labels = {
"meta_launch_url": _("Launch URL"), "meta_launch_url": _("Launch URL"),
@ -41,4 +38,3 @@ class ApplicationForm(forms.ModelForm):
"meta_description": _("Description"), "meta_description": _("Description"),
"meta_publisher": _("Publisher"), "meta_publisher": _("Publisher"),
} }
help_texts = {"policies": _("Policies required to access this Application.")}

View File

@ -13,9 +13,7 @@ class UserLogoutStageView(AuthenticationStage):
def get(self, request: HttpRequest) -> HttpResponse: def get(self, request: HttpRequest) -> HttpResponse:
LOGGER.debug( LOGGER.debug(
"Logged out", "Logged out", user=request.user, flow_slug=self.executor.flow.slug,
user=request.user,
flow_slug=self.executor.flow.slug,
) )
logout(self.request) logout(self.request)
return self.executor.stage_ok() return self.executor.stage_ok()