Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Muhammadbugaje/NAMETS_Website/llms.txt

Use this file to discover all available pages before exploring further.

This page documents all environment variables that the NAMETS platform reads at startup through os.environ.get() and python-dotenv’s load_dotenv(). Variables are grouped by concern. In production on Render, these are set in the service’s Environment tab or declared in render.yaml. Locally, place them in a .env file at the project root — Django loads it automatically.

Core Django Settings

SECRET_KEY
string
required
The Django cryptographic secret key used to sign cookies, sessions, and CSRF tokens. In production, Render generates this automatically (generateValue: true). Never share or reuse a production key.
DEBUG
boolean
default:"False"
Enables Django’s debug mode. Set to True only in local development. The render.yaml explicitly sets this to false for all deployed instances. When True, full tracebacks are exposed to the browser.
ALLOWED_HOSTS
string
default:".onrender.com"
A comma-separated list of hostnames Django is permitted to serve. In production this defaults to .onrender.com, which matches all Render subdomains. For local development, localhost,127.0.0.1 is used as the fallback.
# Production (single Render service)
ALLOWED_HOSTS=.onrender.com

# Local development
ALLOWED_HOSTS=localhost,127.0.0.1
CSRF_TRUSTED_ORIGINS
string
A comma-separated list of origins Django will accept CSRF tokens from. Required when the site is behind a reverse proxy or accessed through a custom domain. Example: https://namets.onrender.com,https://namets.org.

Database

DATABASE_URL
string
required
A full PostgreSQL connection string parsed by dj-database-url. This is the only database variable required in production — the library extracts host, port, user, password, and database name from the URL automatically.
DATABASE_URL=postgres://user:password@host:5432/dbname?sslmode=require
The render.yaml marks this as sync: false, meaning Render will not auto-populate it — you must paste the connection string from your PostgreSQL provider (e.g. Neon, Aiven, Supabase, Render Postgres).

Cloudinary Media Storage

CLOUDINARY_CLOUD_NAME
string
required
Your Cloudinary cloud name, found in the Cloudinary dashboard under Settings → Account. All media uploads (images, PDFs, files) are routed to this cloud.
CLOUDINARY_API_KEY
string
required
The API key for your Cloudinary account. Used together with CLOUDINARY_API_SECRET to authenticate upload and management requests.
CLOUDINARY_API_SECRET
string
required
The API secret for your Cloudinary account. Treat this like a password — it grants full write access to your media library.

n8n Automation

N8N_API_TOKEN
string
required
A long-lived API token generated inside your n8n instance. The platform’s N8NAuthentication class reads this from settings and compares it against the X-N8N-Token header on every API request originating from n8n. If the tokens do not match, the request is rejected with 401 Unauthorized.
N8N_WEBHOOK_URL
string
The full URL of the n8n webhook that receives outbound events from the NAMETS platform. Defaults to the Render-hosted n8n service URL declared in render.yaml. Override this if you self-host n8n elsewhere.
N8N_WEBHOOK_URL=https://n8n-render-5s6o.onrender.com/webhook/namets-events
WEBHOOK_SECRET
string
A shared secret included in outbound webhook payloads so that the n8n endpoint can verify the request originated from NAMETS. Set sync: false in render.yaml — supply it manually in the Render dashboard.

Complete .env Example

Copy this template to your project root and fill in the blanks before running the development server.
# .env — local development only, never commit to version control

# Django
SECRET_KEY=your-long-random-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
CSRF_TRUSTED_ORIGINS=http://localhost:8000,http://127.0.0.1:8000

# Database (PostgreSQL)
DATABASE_URL=postgres://user:password@localhost:5432/namets_dev

# Cloudinary
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=123456789012345
CLOUDINARY_API_SECRET=your_api_secret_here

# n8n Automation
N8N_API_TOKEN=your_n8n_api_token_here
N8N_WEBHOOK_URL=https://your-n8n-instance.onrender.com/webhook/namets-events
WEBHOOK_SECRET=your_webhook_secret_here
Never commit your .env file to version control. Add .env to .gitignore immediately. Leaking SECRET_KEY, CLOUDINARY_API_SECRET, or N8N_API_TOKEN can result in a full account compromise and loss of all stored media. In production, always use your hosting provider’s secrets manager (Render Environment tab) rather than a .env file.

Build docs developers (and LLMs) love