mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-12 12:09:50 +02:00
- Adopt Ruff `I` (isort) rules for consistent import sorting - Add two `# isort: split` boundaries to keep required imports pinned in `__init__.py` modules
18 lines
467 B
Python
18 lines
467 B
Python
import string
|
|
|
|
from django.db.models import Q
|
|
|
|
OBJECTPERMISSION_OBJECT_TYPES = (
|
|
(Q(public=True) & ~Q(app_label='core', model='objecttype'))
|
|
| Q(app_label='core', model__in=['managedfile'])
|
|
| Q(app_label='extras', model__in=['scriptmodule', 'taggeditem'])
|
|
)
|
|
|
|
CONSTRAINT_TOKEN_USER = '$user'
|
|
|
|
# API tokens
|
|
TOKEN_PREFIX = 'nbt_' # Used for v2 tokens only
|
|
TOKEN_KEY_LENGTH = 12
|
|
TOKEN_DEFAULT_LENGTH = 40
|
|
TOKEN_CHARSET = string.ascii_letters + string.digits
|