Commit c2a9dc6d authored by Katrina Bernice Tan's avatar Katrina Bernice Tan

Cleaned code for Assignment views

parent 1ebebc0f
...@@ -9,7 +9,7 @@ def index(request): ...@@ -9,7 +9,7 @@ def index(request):
assignments = Assignment.objects.all() assignments = Assignment.objects.all()
for i in assignments: for i in assignments:
#print += "Assignment Name: " + i.name + "\n Description + " + i.description + "\n Perfect Score + " + str(i.max_points) + "\n Passing Score: " + str(i.passing_score) + "\n Course/Section: "
print += f"<br /> Assignment name: {i.name} <br /> Description: {i.description} <br /> Perfect score: {i.max_points} <br /> Passing score: {i.passing_score} <br /> Course/Section: {i.course} <br />" print += f"<br /> Assignment name: {i.name} <br /> Description: {i.description} <br /> Perfect score: {i.max_points} <br /> Passing score: {i.passing_score} <br /> Course/Section: {i.course} <br />"
return HttpResponse(print) return HttpResponse(print)
# Create your views here. # Create your views here.
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