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 guide walks you through getting a fully functional local copy of the NAMETS Website running on your machine. You will clone the repository, create a Python virtual environment, install all dependencies from requirements.txt, configure the required environment variables, run database migrations, create an admin superuser, and launch the Django development server — all in under ten minutes.
1

Clone the Repository

Clone the NAMETS Website repository from GitHub and navigate into the project directory.
git clone https://github.com/Muhammadbugaje/NAMETS_Website.git && cd NAMETS_Website
2

Create and Activate a Virtual Environment

Create an isolated Python virtual environment and activate it to keep dependencies scoped to this project.
python -m venv venv && source venv/bin/activate
On Windows, activate with:
venv\Scripts\activate
3

Install Dependencies

Install all required Python packages from the project’s requirements.txt. This includes Django 6.0, Django REST Framework, Cloudinary, WhiteNoise, Gunicorn, and all other dependencies.
pip install -r requirements.txt
4

Configure Environment Variables

Create a .env file in the project root and populate it with the required environment variables. The application reads these at startup via python-dotenv.
# Django core
SECRET_KEY=your-secret-key-here
DEBUG=True

# Database (Neon PostgreSQL connection string)
DATABASE_URL=postgresql://user:password@host/dbname?sslmode=require

# Cloudinary media storage
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret

# n8n webhook integration
N8N_WEBHOOK_URL=https://your-n8n-instance.onrender.com/webhook/namets-events
WEBHOOK_SECRET=your-webhook-secret
N8N_API_TOKEN=your-n8n-api-token

# Allowed hosts (comma-separated, no spaces)
ALLOWED_HOSTS=localhost,127.0.0.1
VariableDescription
SECRET_KEYDjango secret key — use a long random string in production
DEBUGSet True for local development; never True in production
DATABASE_URLFull PostgreSQL connection string (Neon recommended)
CLOUDINARY_CLOUD_NAMEYour Cloudinary account cloud name
CLOUDINARY_API_KEYCloudinary API key for media uploads
CLOUDINARY_API_SECRETCloudinary API secret
N8N_WEBHOOK_URLWebhook endpoint URL for n8n event automation
WEBHOOK_SECRETShared secret to validate incoming webhook requests
N8N_API_TOKENBearer token for authenticating n8n API calls
ALLOWED_HOSTSComma-separated list of allowed hostnames
5

Run Database Migrations

Apply all Django database migrations to initialize the schema across all installed apps (core, communications, events, academics, lostfound, community, gallery, namets_notifications, api).
python manage.py migrate
6

Create a Superuser

Create an admin superuser account. You will use these credentials to log in to the Django admin panel.
python manage.py createsuperuser
Follow the prompts to set a username, email address, and password.
7

Collect Static Files

Gather all static assets (CSS, JavaScript, images) into the staticfiles/ directory so WhiteNoise can serve them correctly.
python manage.py collectstatic --noinput
8

Start the Development Server

Launch the Django development server. The application will be accessible in your browser immediately.
python manage.py runserver
Once the server is running, open http://127.0.0.1:8000 in your browser to view the public-facing site. Access the admin panel at http://127.0.0.1:8000/admin/ using the superuser credentials you created in Step 6.
When you are ready to move beyond local development, see the Deployment guide for instructions on deploying to Render with PostgreSQL (Neon) and Cloudinary configured for production.

Build docs developers (and LLMs) love