The Internship Portal is built around two distinct user roles: students and companies. Every registered account belongs to one of these roles, and the role determines which views, actions, and data are available to that user. The role is set at registration time and stored on the user’sDocumentation 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.
Profile record, which is auto-created alongside each new Django User.
- Student
- Company
Student Profile
A student account is designed for individuals who want to browse open internship listings and submit applications. After registering, a student can fill out their profile with academic and personal details that help companies evaluate their applications.Profile fields available to students:| Field | Description |
|---|---|
full_name | The student’s full display name |
university | Name of the student’s university or college |
degree | Degree programme or field of study |
skills | Free-text list of relevant technical skills |
bio | Short personal statement or introduction |
cv | Uploaded CV file (stored under cvs/) |
profile_picture | Avatar image (stored under profile_pictures/) |
- Browse all active internship listings at
GET /internships/ - View full internship details at
GET /internships/<id>/ - Submit an application with one click from the detail page
- Track submitted applications and their statuses at
GET /applications/my/ - Edit their profile (including uploading a CV and profile picture) at
POST /users/edit-profile/ - Receive in-app notifications when a company accepts or rejects their application
Registration
New users register through a single form that extends Django’s built-inUserCreationForm. The extra user_type field is what separates a student account from a company account — it is a required ChoiceField with the two allowed values. The username, password1, and password2 fields each carry a custom widget with Bootstrap classes; user_type uses a Select widget:
User, reads user_type from cleaned_data, sets it on the already-created Profile, and immediately logs the user in:
Profile Auto-Creation
Every time a newUser is saved to the database for the first time, Django fires a post_save signal. The Internship Portal connects a receiver to this signal that automatically creates a blank Profile record linked to the new user. This means there is no risk of a user existing without a profile, and no manual step is required.
created guard ensures the receiver only runs on INSERT, not on every subsequent UPDATE to the User record.
Profile Model Fields
TheProfile model uses a single flat table for both roles. Student-specific and company-specific fields live side by side; whichever set is irrelevant for a given user is simply left blank.
The Django
auth.User this profile belongs to. Deleted when the user is deleted (CASCADE). Accessible as user.profile.Role of the account. Must be one of
"student" or "company". Set during registration via RegisterForm.(Student) The student’s full display name. Max 100 characters.
(Student) Name of the student’s university or college. Max 100 characters.
(Student) Degree programme or field of study. Max 100 characters.
(Student) Free-text description of the student’s technical and soft skills.
(Student) Short personal statement or introduction shown on the public profile page.
(Company) Official name of the organisation. Max 100 characters.
(Company) Business sector or industry (e.g. Software, Finance, Healthcare). Max 100 characters.
(Company) Full URL of the company’s website.
(Company) Primary office location (city, country, or remote). Max 100 characters.
(Student) Uploaded CV or résumé file. Stored under
media/cvs/. Optional — blank=True, null=True.Uploaded avatar or company logo. Stored under
media/profile_pictures/. Optional for both roles. Can be removed by posting remove_picture=1 on the edit-profile form.Student fields (
full_name, university, degree, skills, bio, cv) and company fields (company_name, industry, website, location) all live on the same Profile model. The fields that do not apply to a given role are simply left blank — there is no separate table per role. Filter on user_type to determine which set of fields to display or validate.URL Routes
All user-related routes are mounted under the/users/ prefix in the main URL configuration.
| Method | Path | View | Description |
|---|---|---|---|
GET / POST | /users/register/ | register | Create a new student or company account |
GET / POST | /users/login/ | user_login | Authenticate an existing user |
GET | /users/logout/ | user_logout | Log out and redirect to login page |
GET | /users/profile/ | profile | View the logged-in user’s own profile |
GET / POST | /users/edit-profile/ | edit_profile | Edit profile fields and upload files |
GET | /users/profile/<user_id>/ | public_profile | View a student’s public profile (student accounts only) |
GET | /users/dashboard/ | dashboard | Role-aware dashboard for the logged-in user |