1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 from django import forms
7 class CardTokenForm(forms.Form):
8 token = forms.CharField(widget=forms.HiddenInput)
10 def get_queryset(self, view):
11 raise NotImplementedError()
14 self.instance, created = self.get_queryset(view).get_or_create(
15 pos_id=view.get_pos().pos_id,
16 disposable_token=self.cleaned_data['token']