Commit 75ba0626 authored by Joan Denise Nocos's avatar Joan Denise Nocos

feat: added details view and URL to assignments app

parent 8bdb1dc7
...@@ -3,5 +3,8 @@ from django.urls import path ...@@ -3,5 +3,8 @@ from django.urls import path
from . import views from . import views
urlpatterns = [ urlpatterns = [
path('', views.index, name='index') # assignments/
path('', views.index, name='index'),
# assignments/<assignment_id>/details/
path('<int:assignment_id>/details/', views.details, name='details'),
] ]
\ No newline at end of file
...@@ -17,4 +17,8 @@ def index(request): ...@@ -17,4 +17,8 @@ def index(request):
assignment.course.course_title, assignment.course.course_title,
assignment.course.section) assignment.course.section)
return HttpResponse(assignments_view) return HttpResponse(assignments_view)
\ No newline at end of file
def details(request, assignment_id):
response = "Assignment ID: %s."
return HttpResponse(response % assignment_id)
\ 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