mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Move admin views for users, groups, and object permissions from the admin site to the NetBox frontend --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
22 lines
477 B
Python
22 lines
477 B
Python
from django import forms
|
|
from django.utils.translation import gettext as _
|
|
|
|
from users.models import Token
|
|
|
|
__all__ = (
|
|
'TokenAdminForm',
|
|
)
|
|
|
|
|
|
class TokenAdminForm(forms.ModelForm):
|
|
key = forms.CharField(
|
|
required=False,
|
|
help_text=_("If no key is provided, one will be generated automatically.")
|
|
)
|
|
|
|
class Meta:
|
|
fields = [
|
|
'user', 'key', 'write_enabled', 'expires', 'description', 'allowed_ips'
|
|
]
|
|
model = Token
|