How mehmet4406/cuny-student-portal works
Purpose and entry points
This is a Django student portal for authentication, student profiles, course browsing, semester selection, and enrollment. HTTP entry points are routed through config/urls.py into app routes in portal/urls.py; request behavior is implemented in portal/views.py. Deployment can use either config/wsgi.py or config/asgi.py.
Django project boundary
config/settings.py defines the project runtime, installed applications, middleware, templates, database, and authentication-related settings. manage.py is the operational entry point for development server, migrations, and admin commands. The portal package is the primary Django application.
Domain model and persistence
The relational domain is centered in portal/models.py, with migration history in portal/migrations/0001_initial.py through portal/migrations/0009_academicdepartment_remove_course_capacity_and_more.py. The evolving model includes students/student profiles, majors, courses, semesters, sections, enrollments, and academic departments. Django ORM forms the persistence boundary between portal workflows and the configured database.
User identity and student profile flow
Authentication and registration are handled by views and forms in portal/views.py and portal/forms.py, rendered through portal/templates/portal/login.html and portal/templates/portal/signup.html. Authenticated users proceed to dashboard/profile functionality, with student-specific state represented by the model layer and displayed in portal/templates/portal/dashboard.html and portal/templates/portal/student_profile.html.
Academic selection and enrollment flow
Course and semester selection are distinct UI stages: portal/templates/portal/select_semester.html establishes the academic term, while portal/templates/portal/select_courses.html supports course/section choices. portal/views.py coordinates these requests against portal/models.py, where enrollment and section entities provide the transactional boundary for a student’s selections. Course presentation is also exposed through portal/templates/portal/courses.html.
Presentation and administration
Server-rendered Django templates live under portal/templates/portal/, with portal/templates/portal/home.html acting as a public/home surface. Administrative management is registered in portal/admin.py and exposed through Django’s admin infrastructure configured by config/urls.py; this is the operational interface for managing academic records.
Legacy or standalone data utilities
Root-level modules main.py, data_manager.py, courses.py, student.py, admin.py, and utils.py, plus JSON files in data/, suggest a separate file-backed or earlier command-line data-management layer. Its data boundary is data/courses.json, data/students.json, and data/admins.json; it should be treated as separate from the Django ORM unless explicitly integrated.
Main entry points: settings.py Runtime settings · views.py Portal workflows · models.py Academic domain · urls.py Project routes
Components 15
Django project
- Management CLI
manage.py - Runtime settings · Defines apps, middleware, templates, database, and auth settings.
config/settings.py - Project routes · Routes portal and admin requests.
config/urls.py - WSGI deployment
config/wsgi.py - ASGI deployment
config/asgi.py - Configured database
Student portal
- Portal routes
portal/urls.py - Portal workflows · Handles authentication, profiles, selection, and enrollment requests.
portal/views.py - Auth forms
portal/forms.py - Academic domain · Students, majors, courses, semesters, sections, enrollments, and departments.
portal/models.py - Schema history
portal/migrations/0001_initial.py - Portal templates · Home, login, signup, dashboard, profile, courses, semester, and course selection screens.
- Academic admin
portal/admin.py
Legacy data utilities
Separate file-backed layer.
- Legacy CLI layer · Earlier file-backed student and course management.
main.py - JSON data store · Courses, students, and administrator records.
data/courses.json
Connections 15
- Management CLI → Runtime settings: loads runtime settings
- WSGI deployment → Runtime settings: loads
- ASGI deployment → Runtime settings: loads
- Project routes → Portal routes: includes
- Project routes → Academic admin: exposes admin
- Portal routes → Portal workflows: dispatches requests
- Portal workflows → Auth forms: validates auth input
- Portal workflows → Academic domain: reads and updates
- Portal workflows → Portal templates: renders
- Academic domain → Configured database: persists through ORM
- Schema history → Configured database: evolves schema
- Academic admin → Academic domain: manages records
- Runtime settings → Configured database: configures
- Runtime settings → Portal templates: configures discovery
- Legacy CLI layer → JSON data store: reads and writes