django settings variables
- BASE_DIR:
The absolute filesystem path to the Django project's base directory.
SECRET_KEY:
A secret key for cryptographic functions and securing session data.
DEBUG:
A boolean that determines whether debugging is enabled. Set to True during development for detailed error pages.
ALLOWED_HOSTS:
A list of valid host/domain names for the Django project, used for security measures.
INSTALLED_APPS:
A tuple containing the names of all installed Django applications.
MIDDLEWARE:
A tuple containing the names of middleware classes to process requests and responses.
ROOT_URLCONF:
The Python import path to the root URL configuration for the project.
TEMPLATES:
A list of dictionaries, each containing configuration options for the template engine.
WSGI_APPLICATION:
The Python import path to the WSGI application for the project.
DATABASES:
- A dictionary containing configuration options for one or more databases used by the project.
AUTH_PASSWORD_VALIDATORS:
- A list of dictionaries specifying the password validation rules for user authentication.
LANGUAGE_CODE:
- A string representing the default language code for the project.
TIME_ZONE:
- A string representing the default time zone for the project.
USE_I18N:
- A boolean indicating whether to use internationalization features.
USE_L10N:
- A boolean indicating whether to use localization features.
USE_TZ:
- A boolean indicating whether to use time zone support.
STATIC_URL:
- The base URL to serve static files from, such as stylesheets and images.
STATICFILES_DIRS:
- A list of directories where Django will look for additional static files.
MEDIA_URL:
- The base URL to serve user-uploaded media files from.
MEDIA_ROOT:
- The absolute filesystem path to the directory that holds user-uploaded media files.
DEFAULT_AUTO_FIELD:
- The default primary key field for models if not explicitly specified.
SESSION_ENGINE:
- A string representing the Django session engine to use.
SESSION_COOKIE_AGE:
- An integer representing the age of session cookies in seconds.
CSRF_COOKIE_SECURE:
- A boolean indicating whether the CSRF cookie should be marked as secure.
X_FRAME_OPTIONS:
- A string specifying the X-Frame-Options header value for clickjacking protection.
SECURE_BROWSER_XSS_FILTER:
- A boolean indicating whether the browser should filter cross-site scripting attacks.
SECURE_SSL_REDIRECT:
- A boolean indicating whether to redirect all non-HTTPS requests to HTTPS.
SECURE_HSTS_SECONDS:
- An integer representing the duration of the HTTP Strict Transport Security (HSTS) header.
SECURE_HSTS_INCLUDE_SUBDOMAINS:
- A boolean indicating whether to include subdomains in the HSTS header.
SECURE_HSTS_PRELOAD:
- A boolean indicating whether to include the project in the HSTS preload list.