mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
15 lines
454 B
Python
15 lines
454 B
Python
# String expansion patterns
|
|
NUMERIC_EXPANSION_PATTERN = r'\[((?:\d+[?:,-])+\d+)\]'
|
|
ALPHANUMERIC_EXPANSION_PATTERN = r'\[((?:[a-zA-Z0-9]+[?:,-])+[a-zA-Z0-9]+)\]'
|
|
|
|
# IP address expansion patterns
|
|
IP4_EXPANSION_PATTERN = r'\[((?:[0-9]{1,3}[?:,-])+[0-9]{1,3})\]'
|
|
IP6_EXPANSION_PATTERN = r'\[((?:[0-9a-f]{1,4}[?:,-])+[0-9a-f]{1,4})\]'
|
|
|
|
# Boolean widget choices
|
|
BOOLEAN_WITH_BLANK_CHOICES = (
|
|
('', '---------'),
|
|
('True', 'Yes'),
|
|
('False', 'No'),
|
|
)
|