AllDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/rahul-baberwal/django-var-cms/llms.txt
Use this file to discover all available pages before exploring further.
django-var-cms settings are optional Django settings prefixed with VAR_CMS_. They are read once during VarCMSSite initialization at Django startup. You can also set attributes directly on the var_cms_site singleton to override any of these values at import time (see Programmatic Overrides below).
Complete Settings Example
The block below shows every availableVAR_CMS_* setting alongside the required Django settings for static files, media handling, and authentication routing.
Branding & Identity
The brand title displayed in the sidebar header. Shown prominently at the top of the navigation panel.
The subtitle rendered directly below the site header in the sidebar. Typically a short descriptor such as
"ADMIN PANEL" or "CONTROL PANEL".The URL used for the View Site link in the sidebar. Set this to the public-facing root of your project so staff can navigate from the CMS to the live site.
The URL of the logo image rendered in the sidebar header. Accepts any relative or absolute URL. Ignored when
VAR_CMS_LOGO_SVG is also set.A raw SVG string used as a vector logo in the sidebar. When provided, this takes precedence over
VAR_CMS_LOGO_URL. Set to None to fall back to the raster image logo.An HSL color string in
"H, S%, L%" format applied as the theme accent color across buttons, highlights, and active states throughout the Control Panel.The lightness component (L%) is automatically clamped between 45% and 85% to ensure readability in both light and dark contexts. The value is stored internally as a formatted "H, S%, L%" string after clamping.Authentication
When set to
True, a successful username/password login redirects users to a 6-digit OTP verification screen before granting access to the dashboard. The OTP is sent to the user’s registered email address via Django’s send_mail.If your SMTP settings are not configured, the OTP is printed directly to the terminal as
[VAR CMS OTP]: ###### so developers are never locked out during local development.The name of the field on the User model used as the username identifier. When
None (default), django-var-cms falls back to User.USERNAME_FIELD from the active authentication backend — usually "username" for Django’s built-in User model.Set this explicitly when using a custom user model whose login field differs from USERNAME_FIELD.Dashboard
A list of model identifiers whose dashboard cards should be hidden. Each entry may be either:
- A bare
model_namestring (e.g."logentry") - A
"app_label.model_name"string (e.g."demo.category")
VAR_CMS_SHOWN_DASHBOARD_CARDS takes precedence. If a model appears in both lists, it is hidden.When non-empty, only the listed models are shown as dashboard cards. All other registered models are hidden from the dashboard regardless of their
dashboard_card attribute.Entries follow the same format as VAR_CMS_HIDDEN_DASHBOARD_CARDS — bare model_name or "app_label.model_name".The heading text displayed at the top of the dashboard page.
The body paragraph rendered below the dashboard title. Supports two format placeholders that are interpolated at render time:
| Placeholder | Replaced with |
|---|---|
{username} | The current user’s username string |
{user} | Alias for {username} |
Developer Profile
These settings populate the Help & Support (/var-cms/about/) section of the Control Panel. They identify the developer or agency that built and maintains the CMS instance.
The full name of the developer or agency shown in the Help section.
The developer’s personal or company website URL.
URL of the developer’s GitHub profile or the project repository.
URL of the developer’s LinkedIn profile.
Contact email address for the developer or support team.
URL of the developer’s avatar image displayed alongside the profile in the Help section. Any publicly accessible image URL is valid.
Programmatic Overrides
You can set attributes directly on thevar_cms_site singleton inside any var_cms_admin.py file. Because var_cms_admin.py files are auto-discovered after Django’s settings module is loaded, attribute assignments here always take precedence over settings.py values.
settings.py values are read once when VarCMSSite() is instantiated at Django startup. Attributes set directly on var_cms_site in var_cms_admin.py are applied afterwards and therefore take precedence over any VAR_CMS_* setting.VAR_CMS_* setting to its corresponding var_cms_site attribute:
settings.py key | var_cms_site attribute |
|---|---|
VAR_CMS_SITE_HEADER | var_cms_site.site_header |
VAR_CMS_SITE_SUB | var_cms_site.site_sub |
VAR_CMS_SITE_URL | var_cms_site.site_url |
VAR_CMS_LOGO_URL | var_cms_site.logo_url |
VAR_CMS_LOGO_SVG | var_cms_site.logo_svg |
VAR_CMS_ACCENT_COLOR | var_cms_site.accent_color |
VAR_CMS_ENABLE_OTP | var_cms_site.enable_otp |
VAR_CMS_USERNAME_FIELD | var_cms_site.username_field |
VAR_CMS_HIDDEN_DASHBOARD_CARDS | var_cms_site.hidden_dashboard_cards |
VAR_CMS_SHOWN_DASHBOARD_CARDS | var_cms_site.shown_dashboard_cards |
VAR_CMS_DASHBOARD_TITLE | var_cms_site.dashboard_title |
VAR_CMS_DASHBOARD_TEXT | var_cms_site.dashboard_text |
VAR_CMS_DEVELOPER_NAME | var_cms_site.developer_name |
VAR_CMS_DEVELOPER_WEBSITE | var_cms_site.developer_website |
VAR_CMS_DEVELOPER_GITHUB | var_cms_site.developer_github |
VAR_CMS_DEVELOPER_LINKEDIN | var_cms_site.developer_linkedin |
VAR_CMS_DEVELOPER_EMAIL | var_cms_site.developer_email |
VAR_CMS_DEVELOPER_IMAGE | var_cms_site.developer_image |
Required Django Settings
The following standard Django settings are notVAR_CMS_* prefixed, but must be configured correctly for django-var-cms to function fully.
The URL Django redirects unauthenticated users to when they attempt to access a
@login_required view. Set this to the django-var-cms login page so users land on the custom glassmorphic login screen rather than Django’s default.The URL Django redirects users to after a successful login when no
next parameter is present. Set to the django-var-cms dashboard root.The URL prefix used to serve user-uploaded files (images, files, cropped assets). Must end with a slash.
The absolute filesystem path to the directory where uploaded files are stored. Django’s image crop and media conversion features write output files here.
The URL prefix used to serve static files (CSS, JavaScript, images bundled with the package). Must end with a slash.
A list of filesystem directories Django searches for additional static files beyond each app’s own
static/ subdirectory. Include your project-level static/ folder here so custom logo assets and overrides are picked up.The absolute filesystem path where
python manage.py collectstatic assembles all static files for production deployment. Must differ from any path listed in STATICFILES_DIRS.