vault backup: 2025-12-26 02:09:22
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 2m29s
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 2m29s
This commit is contained in:
18
stroma/quiz/models/exam_model.py
Normal file
18
stroma/quiz/models/exam_model.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from django.db import models
|
||||
from .course_model import Course
|
||||
|
||||
|
||||
class Exam(models.Model):
|
||||
course = models.ForeignKey(Course, on_delete=models.CASCADE, related_name='exams')
|
||||
date = models.DateField()
|
||||
name = models.CharField(max_length=200, blank=True) # e.g., "2022-01-15"
|
||||
folder_path = models.CharField(max_length=500, blank=True) # Path to exam folder in content
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
unique_together = ['course', 'date']
|
||||
ordering = ['-date']
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.course.name} - {self.date}"
|
||||
|
||||
Reference in New Issue
Block a user