Drafted config format concept
This commit is contained in:
parent
0d3cb348db
commit
7aeee8da47
39
config.py
Normal file
39
config.py
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
tableitems = {
|
||||||
|
"assettag": {
|
||||||
|
"display_name": "Asset Tag",
|
||||||
|
"html_input_type": "text",
|
||||||
|
"required": True,
|
||||||
|
"unique": True,
|
||||||
|
"primary_key": True,
|
||||||
|
"regex": r"^[A-Z0-9]+$",
|
||||||
|
}
|
||||||
|
"hostname": {
|
||||||
|
"display_name": "Host Name",
|
||||||
|
"html_input_type": "text",
|
||||||
|
"required": True,
|
||||||
|
"unique": True,
|
||||||
|
"regex": r"^[a-z0-9._-]+$" #
|
||||||
|
},
|
||||||
|
"warrantyfrom": {
|
||||||
|
"display_name": "Warranty From",
|
||||||
|
"html_input_type": "date",
|
||||||
|
"required": True,
|
||||||
|
regex: r"^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$" # Date in YYYY-MM-DD
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"display_name": "Status",
|
||||||
|
"html_input_type": "select",
|
||||||
|
required: True,
|
||||||
|
options: [
|
||||||
|
"active": "Active",
|
||||||
|
"inactive": "Inactive"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"staffnum": {
|
||||||
|
"display_name": "Staff No.",
|
||||||
|
"html_input_type": "number",
|
||||||
|
"required": True,
|
||||||
|
"min": 100000, # 6 digits
|
||||||
|
"max": 99999999 # 8 digits
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user