Commit fc7602a2 authored by Chester Tan's avatar Chester Tan

altered fields in Course model

updated the display format of Assignments views
parent b99e11d4
# Generated by Django 4.0.3 on 2022-04-03 06:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('assignments', '0003_assignment_course'),
]
operations = [
migrations.AlterField(
model_name='course',
name='course_code',
field=models.CharField(max_length=10),
),
migrations.AlterField(
model_name='course',
name='course_title',
field=models.CharField(max_length=100),
),
]
from django.db import models from django.db import models
class Course(models.Model): class Course(models.Model):
course_code = models.SlugField(max_length=10) course_code = models.CharField(max_length=10)
course_title = models.SlugField(max_length=100) course_title = models.CharField(max_length=100)
section = models.CharField(max_length=3) section = models.CharField(max_length=3)
def __str__(self): def __str__(self):
......
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
<p>Description: {{assignment.description}}</p> <p>Description: {{assignment.description}}</p>
<p>Perfect Score: {{assignment.max_points}}</p> <p>Perfect Score: {{assignment.max_points}}</p>
<p>Passing Score: {{assignment.passing_score}}</p> <p>Passing Score: {{assignment.passing_score}}</p>
<p>Course/Section: {{assignment.course.course_code}}-{{assignment.course.course_title}}-{{assignment.course.section}}</p><br> <p>Course/Section: {{assignment.course.course_code}} {{assignment.course.course_title}} {{assignment.course.section}}</p><br>
{% endfor %} {% endfor %}
\ 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