1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. 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']