/gradebook_app

this is assigmment 1 for a dynamic web app development with Django

Primary LanguagePython

Project Overview

  • Web Application for management of grades and marks of students for a School/University.
  • Implemented using Django framework along with PostgreSQL database.
  • A simple development cycle with stages including Documentation, Designing, Coding, Testing and Improvement was practiced.

Project setup

can be set up with: VS Code


Troubleshot

  • upgraded pip with the my project python 3.10.6, pip install --upgrade pip
  • use sudo lsof -t -i tcp:8000 to monitor the port 8000, if port 8000 is occupied, for example if 86597, then use kill -9 86597 in terminal

ERD

ERD generated by Data_Grip


Project Structure

Used built-in admin site
Dealing with many-to-many relationship
  • Semester and Course is used many-to-many relationship
  • Class and Student is used many-to-many relationship thru Enrollment (using Intermediate model to easily add more fields in the future and to avoid the complexity of many-to-many relationship)
User Authentication and Authorization
  • Function-based User Registration in (views.py
  • Function-based User Update Profile (choose 'student' or 'lecturer' group) in views.py, forms.py
  • User login is managed by Built-in User Authentication system
  • Using group_tags.py to manage Authorization in the front end pages.
  • templates are developed in registration folder
Admin site customised functions

admin_config folder is used to customise the admin site, see all comments in the py files.

  1. Upload_Student
  1. Enrol/remove/show student to classes is managed by enrolment_admin
  2. Assign/remove/change/show a lecturer to a class is managed by class_admin
Customised functions

these functions were developed alongside some html templates.

  1. Only Semester model's CRUD were tested with generic views, and developed templates for testing only.
  2. `Lecturer to Enter Marks
  1. Lecturer to Email Student
  • the back-end is supported by Gmail's SMTP service
  • function is managed by function-based view send_email to send email to those students who enrolled in the same class of this lecturer
  1. Stutdent to View Marks
  • the list_view is managed by StudentEnrolmentListView to see the list of enrolled classes (), if the student is not enrolled, will be handled by a well-displayed message.
  • the detail_view is managed by StudentEnrolmentDetailView to see the detail of the course, class and the marked grade.
Extended codebase for a future customised administrator
  • Generic view coded in generic_views,
  • Display control forms.py to control fields showing
  • Rest of models shall repeatedly follow Semester model's CRUD templates

NOTE: since I've used the admin-site to manage the CRUD, so I didn't use the generic view for this project.