Internship Portal is organized as a standard Django project composed of three focused application modules —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.
users, internships, and applications — alongside the config project package that ties everything together. Each app owns its own models, views, URLs, and templates, keeping concerns cleanly separated and making the codebase straightforward to navigate and extend.
Directory Layout
The top-level directory tree reflects Django’s per-app convention. Every app lives at the project root alongsideconfig/ and the shared templates/ folder.
App Responsibilities
Each Django app has a well-defined domain. The table below summarizes what each one owns.users
Custom
Profile model (extending Django’s built-in User), registration, login/logout, profile editing, student and company dashboards, a post_save signal that auto-creates profiles, and a context processor that injects unread notification counts into every template.internships
The
Internship model along with full CRUD views (create, list, detail, edit, delete). Business logic is lifted out of views into services.py, keeping views thin and logic independently testable.applications
The
Application and Notification models. Views handle apply, review (company-side listing with status filter), status update (accept/reject), and marking notifications as read. A unique_together constraint prevents duplicate applications.config
The Django project package. Contains
settings.py, the root urls.py, wsgi.py, and asgi.py. All global configuration — installed apps, middleware, template directories, database, media files — lives here.URL Routing
The root URL configuration inconfig/urls.py acts as a dispatcher, delegating each URL prefix to the corresponding app’s own urls.py via Django’s include().
users/— all authentication and profile routes (register, login, logout, dashboard, edit profile)internships/— listing, detail, create, edit, delete, and toggle-status routesapplications/— apply, my-applications, company applications, update status, and mark-notifications-read routes
static() call appends a URL pattern that serves uploaded media files (CVs, profile pictures) from MEDIA_ROOT during development.
Templates
Templates follow Django’s per-app convention: each app stores its own HTML files underapp/templates/app/. This double-nesting prevents name collisions when Django’s template loader searches all installed apps.
base.html lives at the top-level templates/ directory — the path is registered in settings.py via "DIRS": [BASE_DIR / "templates"]. Every app template extends this base, ensuring a consistent layout and shared navigation across all pages.
Service Layer
Theinternships/services.py module contains pure business logic functions that are entirely separate from Django’s request/response cycle. Views import and call these functions rather than constructing ORM queries inline, which keeps views lean and makes the business logic straightforward to unit test.
active and closed.
The service layer functions in
internships/services.py are thin wrappers over ORM queries, making them easy to unit test independently of Django’s request/response cycle. You can call them directly in a test without setting up a full HTTP request or response object.Signals
users/signals.py uses Django’s post_save signal to automatically create a Profile record whenever a new User is saved. This ensures every user always has a corresponding profile without requiring any manual step in the registration flow.
users/apps.py via the ready() hook, which imports users.signals after the app registry has fully loaded — the standard Django pattern for connecting signals without triggering premature imports.