Add image field for assignments model

parent f7730826
# Generated by Django 4.0.3 on 2022-05-14 14:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('assignments', '0006_assignment_course'),
]
operations = [
migrations.AddField(
model_name='assignment',
name='assignment_image',
field=models.ImageField(blank=True, null=True, upload_to='assignments/'),
),
]
......@@ -16,6 +16,7 @@ class Assignment(models.Model):
max_points = models.IntegerField(default=0)
passing_score = models.IntegerField(default=0, editable=False)
course = models.ForeignKey(Course, on_delete=models.CASCADE, default=1)
assignment_image = models.ImageField(null = True, blank = True, upload_to = "assignments/")
def __str__(self):
return self.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment