Skip to content

Tobiloba0/StudentPortalDjangoBackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Result Portal — Fixed & Completed

What was fixed

Bugs fixed:

  • account/util.py: datetime.now()datetime.datetime.now(); random.randint called on module not instance
  • core/models.py: self.Role.ADMIN"admin" (non-existent enum); added UserManager, is_staff, has_perm, has_module_perms
  • result_portal/settings.py: Added AUTH_USER_MODEL = 'core.User'; switched to SQLite fallback for local dev; added rest_framework.authtoken and corsheaders
  • core/urls.py: Fixed nested router lookup kwarg (lookup='department')
  • academics/models.py: Fixed update_at field (was auto_now_add should be auto_now)

Completed features:

  • results/models.py: Added student, course, session FK fields; auto grade computation on save
  • results/views.py: Full CRUD ResultViewSet; student_transcript endpoint; published_results endpoint
  • results/serializers.py: New serializers for results & transcript
  • account/views.py: Login, logout, register endpoints; StudentViewSet, StaffViewSet
  • account/serializers.py: New serializers for all account models
  • account/urls.py, results/urls.py, academics/urls.py: All URL routes
  • Admin registrations for all models

Setup

pip install -r requirements.txt  # or: uv sync
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

API Endpoints

Method URL Description
POST /api/auth/register/ Register user
POST /api/auth/login/ Login → returns token
POST /api/auth/logout/ Logout
GET/POST /api/departments/ List/create departments
GET/POST /api/departments/{code}/courses/ List/create courses in dept
GET/POST /api/students/ List/create students
GET/POST /api/results/ List/create results
GET /api/transcript/{matric}/ Full student transcript
GET /api/results/student/{matric}/ Published results only

Frontend

A full React frontend is included as ResultPortal.jsx — it can be used as a standalone React artifact or integrated into a React project.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages