Passing Score function has been added.

parent b6da92bc
...@@ -14,5 +14,7 @@ class Assignment(models.Model): ...@@ -14,5 +14,7 @@ class Assignment(models.Model):
on_delete=models.PROTECT, on_delete=models.PROTECT,
) )
perfect_score = models.IntegerField() perfect_score = models.IntegerField()
passing = 0.60*float(perfect_score)
passing_score = models.FloatField(passing) @property
\ No newline at end of file def passing_score(self):
return self.perfect_score*0.60
\ 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