django settings variables

  1. BASE_DIR:
  2. The absolute filesystem path to the Django project's base directory.

  3. SECRET_KEY:

  4. A secret key for cryptographic functions and securing session data.

  5. DEBUG:

  6. A boolean that determines whether debugging is enabled. Set to True during development for detailed error pages.

  7. ALLOWED_HOSTS:

  8. A list of valid host/domain names for the Django project, used for security measures.

  9. INSTALLED_APPS:

  10. A tuple containing the names of all installed Django applications.

  11. MIDDLEWARE:

  12. A tuple containing the names of middleware classes to process requests and responses.

  13. ROOT_URLCONF:

  14. The Python import path to the root URL configuration for the project.

  15. TEMPLATES:

  16. A list of dictionaries, each containing configuration options for the template engine.

  17. WSGI_APPLICATION:

  18. The Python import path to the WSGI application for the project.

  19. DATABASES:

    • A dictionary containing configuration options for one or more databases used by the project.
  20. AUTH_PASSWORD_VALIDATORS:

    • A list of dictionaries specifying the password validation rules for user authentication.
  21. LANGUAGE_CODE:

    • A string representing the default language code for the project.
  22. TIME_ZONE:

    • A string representing the default time zone for the project.
  23. USE_I18N:

    • A boolean indicating whether to use internationalization features.
  24. USE_L10N:

    • A boolean indicating whether to use localization features.
  25. USE_TZ:

    • A boolean indicating whether to use time zone support.
  26. STATIC_URL:

    • The base URL to serve static files from, such as stylesheets and images.
  27. STATICFILES_DIRS:

    • A list of directories where Django will look for additional static files.
  28. MEDIA_URL:

    • The base URL to serve user-uploaded media files from.
  29. MEDIA_ROOT:

    • The absolute filesystem path to the directory that holds user-uploaded media files.
  30. DEFAULT_AUTO_FIELD:

    • The default primary key field for models if not explicitly specified.
  31. SESSION_ENGINE:

    • A string representing the Django session engine to use.
  32. SESSION_COOKIE_AGE:

    • An integer representing the age of session cookies in seconds.
  33. CSRF_COOKIE_SECURE:

    • A boolean indicating whether the CSRF cookie should be marked as secure.
  34. X_FRAME_OPTIONS:

    • A string specifying the X-Frame-Options header value for clickjacking protection.
  35. SECURE_BROWSER_XSS_FILTER:

    • A boolean indicating whether the browser should filter cross-site scripting attacks.
  36. SECURE_SSL_REDIRECT:

    • A boolean indicating whether to redirect all non-HTTPS requests to HTTPS.
  37. SECURE_HSTS_SECONDS:

    • An integer representing the duration of the HTTP Strict Transport Security (HSTS) header.
  38. SECURE_HSTS_INCLUDE_SUBDOMAINS:

    • A boolean indicating whether to include subdomains in the HSTS header.
  39. SECURE_HSTS_PRELOAD:

    • A boolean indicating whether to include the project in the HSTS preload list.