Added str func in assignment model to return name.

parent 32c21eeb
...@@ -4,4 +4,7 @@ from django.db import models ...@@ -4,4 +4,7 @@ from django.db import models
class Assignment(models.Model): class Assignment(models.Model):
name = models.CharField(max_length=50) name = models.CharField(max_length=50)
description = models.TextField(max_length=1500) description = models.TextField(max_length=1500)
max_points = models.IntegerField(default=0) max_points = models.IntegerField(default=0)
\ No newline at end of file
def __str__(self):
return self.name
\ No newline at end of file
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