core: add ability for users to create tokens
This commit is contained in:
22
passbook/core/forms/token.py
Normal file
22
passbook/core/forms/token.py
Normal 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(),
|
||||
}
|
Reference in New Issue
Block a user