flask_crud_app/config.sample.py
candifloss 506515bf63 Add: Favicon
Add favicon to BrandingConfig
2025-04-03 11:58:53 +05:30

57 lines
1.6 KiB
Python

from definitions.attributes import *
# Branding Configuration
class BrandingConfig:
APP_NAME = "Inventory Manager"
TAGLINE = "Inventory management system"
# Logo paths (relative to static folder)
LOGIN_LOGO = "images/logo_large.png" # ~400x200px recommended
HEADER_LOGO = "images/logo_small.png" # ~100x50px recommended
FAVICON = "images/favicon.ico" # or .png/.svg
# MySQL information
class sql_conf:
SQL_USER = "assetadmin"
SQL_PASSWORD = "1234"
SQL_HOST = "localhost"
SQL_DB = "asset_test_db"
SQL_TABLE = "asset_test"
item_attributes = [
textAttribute(
attrib_name="assettag",
display_name="Asset Tag",
required=True,
unique=True,
primary=True,
regex=r"^[A-Z0-9]+$", # Only uppercase letters and numbers
default_val="1000000"
),
textAttribute(
attrib_name="hostname",
display_name="Host Name",
required=True,
unique=True,
allowed_chars="abcdefghijklmnopqrstuvwxyz0123456789.-_", # Lowercase letters, numbers, dots, underscores, hyphens
),
dateAttribute(
attrib_name="warrantyfrom",
display_name="Warranty From",
default_val="2020-03-09",
required=True
),
selectAttribute(
attrib_name="status",
display_name="Status",
required=True,
options=["Active", "Inactive"], # Allowed values
default_val="Active"
),
intAttribute(
attrib_name="staffnum",
display_name="Staff No.",
required=True,
min_val=100000, # 6 digits
max_val=99999999, # 8 digits
)
]