Course class has been modified to show course code instead of course object

parent 3336131f
...@@ -6,6 +6,9 @@ class Course(models.Model): ...@@ -6,6 +6,9 @@ class Course(models.Model):
title = models.CharField(max_length=100) title = models.CharField(max_length=100)
section = models.CharField(max_length=3) section = models.CharField(max_length=3)
def __str__(self):
return '{}'.format(self.code)
class Assignment(models.Model): class Assignment(models.Model):
name = models.CharField(max_length=100) name = models.CharField(max_length=100)
description = models.TextField() description = models.TextField()
......
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