Bugs fixed:
account/util.py:datetime.now()→datetime.datetime.now();random.randintcalled on module not instancecore/models.py:self.Role.ADMIN→"admin"(non-existent enum); addedUserManager,is_staff,has_perm,has_module_permsresult_portal/settings.py: AddedAUTH_USER_MODEL = 'core.User'; switched to SQLite fallback for local dev; addedrest_framework.authtokenandcorsheaderscore/urls.py: Fixed nested router lookup kwarg (lookup='department')academics/models.py: Fixedupdate_atfield (wasauto_now_addshould beauto_now)
Completed features:
results/models.py: Addedstudent,course,sessionFK fields; auto grade computation on saveresults/views.py: Full CRUDResultViewSet;student_transcriptendpoint;published_resultsendpointresults/serializers.py: New serializers for results & transcriptaccount/views.py: Login, logout, register endpoints;StudentViewSet,StaffViewSetaccount/serializers.py: New serializers for all account modelsaccount/urls.py,results/urls.py,academics/urls.py: All URL routes- Admin registrations for all models
pip install -r requirements.txt # or: uv sync
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver| 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 |
A full React frontend is included as ResultPortal.jsx — it can be used as a standalone React artifact or integrated into a React project.