---
source: https://iinventedlight.com/library/notes/django-settings.md
title: "Django settings are a Python module of configuration values"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "BSD-3-Clause (django/django); prose restates cited source lines in own words"
license_family: django-bsd3
attribution: "Summary by iinventedlight (AI-assisted). Sources: Django docs, Settings, BSD-3-Clause (django/django); Django source, django.conf.LazySettings, BSD-3-Clause (django/django). Notices: Django documentation and source (django/django): Copyright (c) Django Software Foundation and individual contributors; BSD-3-Clause (https://raw.githubusercontent.com/django/django/stable/6.1.x/LICENSE)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-10
status: published
approved_by: "Cole Withington, 2026-11-10 10:08 PT, Librarian chat widget t33s2: \"Yes, publish all 25 Django and Vue drafts\""
checked_on: 2026-11-10
as_of: 2026-11-10
confidence: medium
untested: "No Django project was run for this note; only the fetched documentation and source files were read."
category: coding-references
topic_area: "code-backend: Django settings"
tags: [django, settings, configuration]
client: Librarian
sources:
  - id: S1
    title: "Settings"
    publisher: Django docs
    url: https://docs.djangoproject.com/en/6.1/topics/settings/
    accessed: 2026-11-10
    license: "BSD-3-Clause"
  - id: S2
    title: "django.conf.LazySettings"
    publisher: Django source
    url: https://github.com/django/django/blob/stable/6.1.x/django/conf/__init__.py
    accessed: 2026-11-10
    license: "BSD-3-Clause"
---
# Django settings are a Python module of configuration values

**Answer:** A Django settings file holds all configuration for a Django installation. It is an ordinary Python module of module-level variables, so it can use normal Python syntax and can assign values dynamically.

## Using settings

Because the file is a Python module, syntax errors are not allowed. If you set `DEBUG` to False, you also need to set `ALLOWED_HOSTS` properly.

## Lazy loading

`django.conf.settings` is a lazy proxy for either the global Django settings or a custom settings object. You can configure settings manually before they are used. The user can configure settings manually. Otherwise, Django uses the settings module pointed to by `DJANGO_SETTINGS_MODULE`.

## See also

- [django-applications](https://iinventedlight.com/library/notes/django-applications/)

## Claims

- id: C1
  claim: A settings file holds all configuration for a Django installation.
  source: S1
  evidence: "A Django settings file contains all the configuration of your Django installation."

- id: C2
  claim: A settings file is a Python module of module-level variables.
  source: S1
  evidence: "A settings file is just a Python module with module-level variables."

- id: C3
  claim: django.conf.settings is a lazy proxy around the configured settings object.
  source: S2
  evidence: "A lazy proxy for either global Django settings or a custom settings object."

- id: C4
  claim: The default load uses the module named by an environment variable.
  source: S2
  evidence: "Load the settings module pointed to by the environment variable."

## Sources

- [S1] Settings. Django docs. https://docs.djangoproject.com/en/6.1/topics/settings/ . License: BSD-3-Clause. Accessed 2026-11-10.

- [S2] django.conf.LazySettings. Django source. https://github.com/django/django/blob/stable/6.1.x/django/conf/__init__.py . License: BSD-3-Clause. Accessed 2026-11-10.


License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Django documentation and source (django/django): Copyright (c) Django Software Foundation and individual contributors; BSD-3-Clause (https://raw.githubusercontent.com/django/django/stable/6.1.x/LICENSE). Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
