{% extends "base.html" %} {% load static %} {% block title %}{% if object %}Edit Configuration - {{ object.key }}{% else %}Add New Configuration{% endif %}{% endblock %} {% block content %}

{% if object %}Edit Configuration{% else %}Add New Configuration{% endif %}

Configuration Information
{% csrf_token %}
{{ form.key }} {% if form.key.errors %}
{{ form.key.errors.0 }}
{% endif %}
Unique identifier for this configuration
{{ form.category }} {% if form.category.errors %}
{{ form.category.errors.0 }}
{% endif %}
{{ form.description }} {% if form.description.errors %}
{{ form.description.errors.0 }}
{% endif %}
{{ form.data_type }} {% if form.data_type.errors %}
{{ form.data_type.errors.0 }}
{% endif %}
{{ form.is_active }} {% if form.is_active.errors %}
{{ form.is_active.errors.0 }}
{% endif %}
Configuration Value
{{ form.value_text }} {% if form.value_text.errors %}
{{ form.value_text.errors.0 }}
{% endif %}
Advanced Options
{{ form.validation_regex }} {% if form.validation_regex.errors %}
{{ form.validation_regex.errors.0 }}
{% endif %}
Regular expression for validation
{{ form.validation_message }} {% if form.validation_message.errors %}
{{ form.validation_message.errors.0 }}
{% endif %}
{{ form.min_value }} {% if form.min_value.errors %}
{{ form.min_value.errors.0 }}
{% endif %}
{{ form.max_value }} {% if form.max_value.errors %}
{{ form.max_value.errors.0 }}
{% endif %}
{{ form.allowed_values }} {% if form.allowed_values.errors %}
{{ form.allowed_values.errors.0 }}
{% endif %}
Comma-separated list of allowed values
Cancel
Help & Guidelines

  • Use uppercase with underscores
  • Group related settings with prefixes
  • Be descriptive but concise
  • Avoid spaces or special characters
Examples:
EMAIL_SMTP_HOST
PATIENT_PORTAL_ENABLED
MAX_APPOINTMENT_DAYS

  • TEXT: For strings, names, descriptions
  • INTEGER: For whole numbers
  • FLOAT: For decimal numbers
  • BOOLEAN: For true/false settings
  • DATE: For date values
  • DATETIME: For date and time values
  • JSON: For structured data
Note: Changing data type after creation may cause data loss

  • SYSTEM: Core system settings
  • EMAIL: Email configuration
  • SECURITY: Security settings
  • UI: User interface settings
  • BILLING: Billing and payment settings
  • APPOINTMENTS: Appointment settings
  • NOTIFICATIONS: Notification settings
  • INTEGRATION: External integration settings

Valid JSON requires:

  • Double quotes for keys
  • Commas between items
  • Proper nesting of objects and arrays
Example:
{
  "name": "value",
  "items": [1, 2, 3],
  "nested": {
    "key": "value"
  }
}
{% endblock %} {% block js %} {% endblock %}