core: add ability for users to create tokens

This commit is contained in:
Jens Langhammer
2020-10-18 15:38:28 +02:00
parent 6a53069653
commit c698ba37d9
7 changed files with 250 additions and 2 deletions

View File

@ -0,0 +1,22 @@
"""Core user token form"""
from django import forms
from passbook.core.models import Token
class UserTokenForm(forms.ModelForm):
"""Token form, for tokens created by endusers"""
class Meta:
model = Token
fields = [
"identifier",
"expires",
"expiring",
"description",
]
widgets = {
"identifier": forms.TextInput(),
"description": forms.TextInput(),
}