Skip to content
Snippets Groups Projects

WIP: Started work on navigation and layout

Closed Jan Maximilian Michal requested to merge 69-general-layout-navigation into master
2 files
+ 8
5
Compare changes
  • Side-by-side
  • Inline
Files
2
  • The extra functionality offered by the ViewSet is not needed in this place and caused unexpected behavior (it returned an array containing an object, breaking the StudentView). For this very simple View imo explicit is better than implicit.
+ 6
2
@@ -12,11 +12,15 @@ router.register(r'student', views.StudentReviewerApiViewSet)
router.register(r'examtype', views.ExamApiViewSet)
router.register(r'submissiontype', views.SubmissionTypeApiView)
router.register(r'tutor', views.TutorApiViewSet)
router.register(r'student-page', views.StudentSelfApiViewSet,
base_name='student_page')
# regular views that are not viewsets
regular_views_urlpatterns = [
url(r'student-page', views.StudentSelfApiView.as_view())
]
urlpatterns = [
url(r'^api/', include(router.urls)),
url(r'^api/', include(regular_views_urlpatterns)),
url(r'^api-token-auth/', obtain_jwt_token),
url(r'^api-token-refresh', refresh_jwt_token),
url(r'^$', TemplateView.as_view(template_name='index.html')),
Loading