Skip to main content

SystemSettings

System settings singleton DocType.

Stores global application configuration. Only one instance exists.

Attributes:
name: Always "System Settings"
app_name: Application display name
timezone: Default timezone (e.g., "UTC", "America/New_York")
date_format: Date format string (e.g., "YYYY-MM-DD")
time_format: Time format string (e.g., "HH:mm:ss")
language: Default language code (e.g., "en")
enable_signup: Allow new user registration
session_expiry: Session timeout in minutes
maintenance_mode: If True, only admins can access

Example:
settings = SystemSettings(
app_name="My App",
timezone="America/New_York",
)

Source: system_settings.py

Fields

FieldTypeRequiredDescriptionValidators
namestrAlways 'System Settings-
app_namestrApplication display namemaxLen: 255
timezonestrDefault timezone (e.g., UTC, America/New_York)-
date_formatstrDate format (e.g., YYYY-MM-DD, DD/MM/YYYY)-
time_formatstrTime format (e.g., HH:mm:ss, hh:mm A)-
languagestrDefault language code (e.g., en, es, fr)minLen: 2, maxLen: 10
enable_signupboolAllow new user registration-
session_expiryintSession timeout in minutesmin: 1, max: 525600
maintenance_modeboolIf True, only admins can access the application-

Permissions

RoleCreateDeleteReadWrite
All
System Manager

Configuration

SettingValue
SubmittableFalse
Track ChangesTrue

Controller

Controller hooks are implemented in *_controller.py files. Available lifecycle hooks:

  • validate() - Called before save, raise exceptions for validation errors
  • before_insert() - Called before inserting a new document
  • after_insert() - Called after successfully inserting
  • before_save() - Called before saving (insert or update)
  • after_save() - Called after saving
  • before_delete() - Called before deleting
  • after_delete() - Called after deleting