Database Updated and Format for section fixed

parent 88405469
...@@ -22,6 +22,9 @@ class Assignment(models.Model): ...@@ -22,6 +22,9 @@ class Assignment(models.Model):
def get_absolute_url(self): def get_absolute_url(self):
return reverse('Assignments:assignment-details', kwargs={'pk': self.pk}) return reverse('Assignments:assignment-details', kwargs={'pk': self.pk})
def get_course_details(self):
return '{} {}-{}'.format(self.course.code, self.course.title, self.course.section)
@property @property
def passing_score(self): def passing_score(self):
return int(self.perfect_score*0.60) return int(self.perfect_score*0.60)
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{% block content %} {% block content %}
<h1>{{ object.name }}</h1> <h1>{{ object.name }}</h1>
<h2>{{ object.course }}</h2> <h2>{{ object.get_course_details }}</h2>
<ul> <ul>
<li>Description: {{ object.description }}</li> <li>Description: {{ object.description }}</li>
<li>Perfect Score: {{ object.perfect_score }}</li> <li>Perfect Score: {{ object.perfect_score }}</li>
......
No preview for this file type
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