All runtime configuration for Internship Portal lives in a single file:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/unesexact/internship-portal-django/llms.txt
Use this file to discover all available pages before exploring further.
config/settings.py. During local development the defaults work out of the box, but before you deploy to any public-facing environment you must update several of these values to harden security, point to the correct database, and serve files correctly. This page walks through each important setting, explains what it controls, and shows you exactly what to change.
Secret Key
Django usesSECRET_KEY to cryptographically sign cookies, sessions, CSRF tokens, and other security-sensitive data. The value committed to the repository is a known-insecure placeholder:
settings.py:
Debug Mode
DEBUG = True enables Django’s interactive error pages, which display full stack traces, local variable values, and configuration details directly in the browser. This is invaluable during development but a critical security risk in production.
DEBUG is False, Django stops serving detailed error pages and falls back to your configured 404 and 500 handlers. You must also configure ALLOWED_HOSTS (see below) before the server will accept requests with debug mode off.
Allowed Hosts
ALLOWED_HOSTS is a list of hostnames that Django will accept in the Host HTTP header. With DEBUG = True the list is ignored; with DEBUG = False any request whose host is not in the list is rejected with a 400 Bad Request.
Database
By default Internship Portal uses SQLite, which requires no installation and stores the entire database in a single file at the project root:psycopg2 (pip install psycopg2-binary) and update the DATABASES block:
python manage.py migrate against the new database to recreate the schema.
Media Files
TheMEDIA_URL and MEDIA_ROOT settings control where Django stores and serves user-uploaded files. Internship Portal uploads two types of files: CV documents (PDFs or other files uploaded by students) and profile pictures (images for both user types).
config/urls.py:
MEDIA_ROOT at the path defined by MEDIA_URL. Remove or guard the static() route addition so it only runs when DEBUG = True.
Installed Apps
Beyond Django’s built-in contrib apps, Internship Portal registers three custom applications inINSTALLED_APPS:
| App | Responsibility |
|---|---|
users.apps.UsersConfig | User registration, login/logout, Profile model (student and company fields, CV upload, profile picture), and the notifications context processor that injects unread notification counts into every template. |
internships | Internship model with title, company (FK to User), location, description, and active/closed status. Provides views for listing, detail, creation, and status toggling. |
applications | Application model (student → internship with pending/accepted/rejected status) and Notification model. Handles submission, duplicate prevention via unique_together, and status updates that trigger notifications. |
users is registered using its AppConfig class (users.apps.UsersConfig) so that Django correctly discovers its signals.py file, which is responsible for automatically creating a Profile record whenever a new User is saved.