Skip to 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

Field Type Required Description Validators
name str Always ’System Settings -
app_name str Application display name maxLen: 255
timezone str Default timezone (e.g., UTC, America/New_York) -
date_format DateFormat Date format (e.g., YYYY-MM-DD, DD/MM/YYYY) -
time_format TimeFormat Time format (e.g., HH:mm:ss, hh:mm A) -
language str Default language code (e.g., en, es, fr) minLen: 2, maxLen: 10
supported_locales list[str] Supported locale codes for the deployment -
enable_signup bool Allow new user registration -
session_expiry int Session timeout in minutes min: 1, max: 525600
maintenance_mode bool If True, only admins can access the application -
trash_retention_days int Days to retain soft-deleted documents before permanent cleanup min: 1, max: 3650
landing_candidates list[LandingCandidate] Ordered list of landing candidates -
Role Create Delete Read Write
All
System Manager
Setting Value
Submittable False
Track Changes True

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