-
Notifications
You must be signed in to change notification settings - Fork 1
Architecture
Deployment is fairly simple. Once the DJANGO_SETTINGS_MODULE is set up to work with WSGI, you run a new thread using gunicorn (file).wsgi. Once this is done, all it takes to update is a git pull and re-run the server. Thomas Kareka will be running the website using a personal linux server running Ubuntu 24. (should be accessible through direct ip, don’t have a domain to host it at)
A virtual machine is not necessary. While Python is mostly universal, Gunicorn is not, but we have a server ready to deploy to. As a backup, we can use PythonAnywhere. A container is also not necessary, but at the very least, we should be using a Python virtual environment.
We will be using SQLite for our database, interfacing through django.db.models.
Users will simply use the default configuration from django.contrib.auth, as not much else needs to be stored for user authentication itself. (just user, name, and hashed password).
Each model will cascade down through a many-to-one system, all leading back to the original user.
Class(models.Model):
-
professor_key: Foreign key reference to the user in which the class belongs to, should delete all nested data if deleted. (models.CASCADE)
- class_name: String of characters limited to 200 characters. (
models.CharField)
Student(models.Model):
-
class_key: Foreign key reference to class that the student is part of.
-
first_name:CharFieldlimited to 100 characters.
-
last_name:CharFieldlimited to 100 characters.
-
seating: Stored using aCharField, has a list of potential seating arrangements usingmodels.Field.choices, combination between front/back and left/center/right or none.
The following could be used to minimize recalculating existing data or additional db calls on the class list page:
-
total_calls:IntegerField
-
absent_calls:IntegerField
-
total_score:IntegerField(Average score would then be calculated from total_score/(total_calls-absent_calls))
StudentRating(models.Model):
-
student_key: Foreign key reference.
-
date: Date or UNIX timestamp in which the rating was created. (models.DateField)
-
attendance: Was the student present when called on? (models.BooleanField)
-
prepared: Another boolean to indicate whether the student was underprepared or not.
-
score:IntegerField, limited between 1-5.