mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
11 lines
371 B
Python
11 lines
371 B
Python
class UserPreference:
|
|
"""
|
|
Represents a configurable user preference.
|
|
"""
|
|
def __init__(self, label, choices, default=None, description='', coerce=lambda x: x):
|
|
self.label = label
|
|
self.choices = choices
|
|
self.default = default if default is not None else choices[0]
|
|
self.description = description
|
|
self.coerce = coerce
|