Commit 11f28fcb authored by Katrina Bernice Tan's avatar Katrina Bernice Tan

Fixed Assignment Templates

parent b42f2948
......@@ -3,8 +3,8 @@ from . import views
from .views import MainView, AssignmentListView, AssignmentDetailView
urlpatterns = [
path('', MainView.as_view(), name='index'),
path('assignment', AssignmentListView.as_view(), name='assignment-list'),
path('', MainView.as_view(), name='assignments'),
path('assignments', AssignmentListView.as_view(), name='assignment-list'),
path('assignment/<int:pk>/details', AssignmentDetailView.as_view(), name ='assignment-detail'),
]
......
......@@ -10,9 +10,9 @@ class MainView(View):
def get(self, request):
course = Course.objects.all().order_by('course_code')
assignment = Assignment.objects.all().order_by('course')
return render(request, 'index.html',{
return render(request, 'assignments.html',{
'course': course,
'assignment': assignment,
'assignments': assignment,
})
class AssignmentListView(ListView):
......
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