Gestor de Tareas Django stores its entire configuration inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/LucPinheiro/gestor-tarea-django/llms.txt
Use this file to discover all available pages before exploring further.
mi_proyecto/settings.py. The file ships with development-friendly defaults — DEBUG = True, a hardcoded SECRET_KEY, and ALLOWED_HOSTS = ['*'] — that are intentionally unsafe for production. Importantly, the default settings.py does not read from environment variables at all; it uses hard-coded values. The recommended approach for production is to modify settings.py to read sensitive values from the environment at runtime, keeping secrets out of source code and making it easy to use different values across development, staging, and production.
Recommended Pattern
Add the following overrides at the top ofsettings.py (after the existing imports) so that each critical value is read from the environment when present and falls back to the hard-coded default for local development. This is not what the file currently does — it is what you should add before going to production.
EnvironmentFile, or the environment variable panel of your PaaS (such as Render). See the Production Deployment guide for concrete examples.
Settings Reference
The following settings are present inmi_proyecto/settings.py. Each entry shows the exact default value as committed in the repository, the expected type, and how the setting affects the running application.
Django’s cryptographic signing key. Used to sign cookies, CSRF tokens, session data, and password-reset links. The repository contains the following hard-coded development placeholder, which must be replaced before going live:Generate a secure replacement with:Never commit a real secret key to version control.
Controls Django’s debug mode. When
True, Django renders detailed error pages with full stack traces and local variable values — invaluable during development but a significant information leak in production. The repository default is True. This must be set to False in all non-development environments.A list of hostnames or IP addresses that Django will serve. The repository default
['*'] accepts requests from any host, which is convenient locally but disables Django’s host-header validation in production. In production, set this to the exact domain(s) your application runs on, for example ['yourdomain.com', 'www.yourdomain.com'].The database backend Django uses to persist data. The default is SQLite, which requires no additional installation and stores all data in a single file on disk. For production deployments that serve more than one concurrent user, switch to
django.db.backends.postgresql. See Switching to PostgreSQL below.The database identifier. For SQLite this is the filesystem path to the
.db file; for PostgreSQL it is the name of the database. The repository default resolves to db.sqlite3 in the project root directory.The default language for Django’s built-in translations (admin interface, form error messages, etc.). Set to
'es-es' (Spanish — Spain) in the repository. Change this to a different BCP 47 tag if you need a different locale.The default time zone used when storing and displaying datetime values. Corresponds to the IANA time zone database name. Set to
'Europe/Madrid' in the repository. USE_TZ = True is also enabled, which means Django stores all datetimes in UTC internally and converts to TIME_ZONE for display.The URL name (not path) that Django redirects unauthenticated users to when they try to access a protected view. Corresponds to the
login named URL pattern in the project’s URL configuration.The URL path Django redirects users to after a successful login when no explicit
next parameter is present in the request. Defaults to /tareas/, the main task list view.The URL path Django redirects users to immediately after they log out. Defaults to
/, the application root.The URL prefix under which static files are served. With the default value, a file at
tareas/static/tareas/style.css is reachable at /static/tareas/style.css. This is the URL Nginx should match in its location /static/ block.The absolute filesystem path that
python manage.py collectstatic writes all static files into. Resolves to staticfiles/ inside the project root. Nginx (or your PaaS) must be configured to serve files from this directory directly. Add staticfiles/ to .gitignore so the collected files are not committed to version control.The default primary key field type used for models that do not explicitly define a primary key. Set to
BigAutoField, which uses a 64-bit integer — the Django 3.2+ recommended default. This matches the repository setting and requires no change for production.Switching to PostgreSQL
SQLite is perfectly adequate for development and single-user production deployments. For any scenario where multiple users may write to the database at the same time — or where you need transactional reliability at scale — PostgreSQL is the recommended backend. Render and most other PaaS providers offer managed PostgreSQL add-ons that are straightforward to attach to a Django application.
DATABASES block in settings.py with the following configuration. Each value is read from the environment so the same settings.py can be used across all environments without modification.
| Variable | Description | Default |
|---|---|---|
DB_NAME | Name of the PostgreSQL database | gestor_tareas |
DB_USER | PostgreSQL role / username | postgres |
DB_PASSWORD | Password for the PostgreSQL role | (empty) |
DB_HOST | Hostname or IP of the PostgreSQL server | localhost |
DB_PORT | TCP port the PostgreSQL server listens on | 5432 |
psycopg2-binary is not currently listed in requirements.txt. To use PostgreSQL, you must add it as an optional dependency and reinstall: