Fixed model relations

parent f74a47a4
from django.db import models from django.db import models
class Course(models.Model):
code = models.CharField(max_length=10, blank=True, null=True)
title = models.CharField(max_length=255, blank=True, null=True)
section = models.CharField(max_length=3, blank=True, null=True)
class Assignment(models.Model): class Assignment(models.Model):
name = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255, blank=True, null=True)
description = models.TextField(blank=True, null=True) description = models.TextField(blank=True, null=True)
...@@ -10,8 +15,3 @@ class Assignment(models.Model): ...@@ -10,8 +15,3 @@ class Assignment(models.Model):
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
self.passing_score = int(self.perfect_score * 0.60) self.passing_score = int(self.perfect_score * 0.60)
super(Assignment, self).save(*args, **kwargs) super(Assignment, self).save(*args, **kwargs)
class Course(models.Model):
code = models.CharField(max_length=10, blank=True, null=True)
title = models.CharField(max_length=255, blank=True, null=True)
section = models.CharField(max_length=3, blank=True, null=True)
\ 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