From 86beeae3ef9a18bf5744d438e3f57e51fb4cf34d Mon Sep 17 00:00:00 2001 From: adityacp Date: Fri, 19 May 2017 16:02:06 +0530 Subject: Add reverse resolutions in urls --- yaksh/urls.py | 66 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 31 deletions(-) (limited to 'yaksh') diff --git a/yaksh/urls.py b/yaksh/urls.py index e4676d3..5270068 100644 --- a/yaksh/urls.py +++ b/yaksh/urls.py @@ -18,7 +18,7 @@ urlpatterns = [ url(r'^complete/$', views.complete), url(r'^complete/(?P\d+)/(?P\d+)/$',\ views.complete), - url(r'^register/$', views.user_register), + url(r'^register/$', views.user_register, name="register"), url(r'^(?P\d+)/check/$', views.check), url(r'^(?P\d+)/check/(?P\d+)/(?P\d+)/$',\ views.check), @@ -29,62 +29,66 @@ urlpatterns = [ url(r'^enroll_request/(?P\d+)/$', views.enroll_request, name='enroll_request'), url(r'^self_enroll/(?P\d+)/$', views.self_enroll, name='self_enroll'), url(r'^view_answerpaper/(?P\d+)/$', views.view_answerpaper, name='view_answerpaper'), - url(r'^download/user_assignment/(?P\d+)/(?P\d+)/(?P\d+)$', - views.download_assignment_file, name="download_user_assignment"), url(r'^manage/$', views.prof_manage, name='manage'), - url(r'^manage/addquestion/$', views.add_question), - url(r'^manage/addquestion/(?P\d+)/$', views.add_question), + url(r'^manage/addquestion/$', views.add_question, name="add_question"), + url(r'^manage/addquestion/(?P\d+)/$', views.add_question, + name="add_question"), url(r'^manage/addquiz/(?P\d+)/$', views.add_quiz, name='add_quiz'), url(r'^manage/addquiz/(?P\d+)/(?P\d+)/$', views.add_quiz, name='edit_quiz'), - url(r'^manage/gradeuser/$', views.grade_user), - url(r'^manage/gradeuser/(?P\d+)/$',views.grade_user), - url(r'^manage/gradeuser/(?P\d+)/(?P\d+)/$',views.grade_user), - url(r'^manage/gradeuser/(?P\d+)/(?P\d+)/(?P\d+)/$',views.grade_user), - url(r'^manage/questions/$', views.show_all_questions), - url(r'^manage/monitor/$', views.monitor), - url(r'^manage/showquestionpapers/$', views.show_all_questionpapers), - url(r'^manage/showquestionpapers/(?P\d+)/$',\ - views.show_all_questionpapers), - url(r'^manage/monitor/(?P\d+)/$', views.monitor), + url(r'^manage/gradeuser/$', views.grade_user, name="grade_user"), + url(r'^manage/gradeuser/(?P\d+)/$',views.grade_user, name="grade_user"), + url(r'^manage/gradeuser/(?P\d+)/(?P\d+)/$', + views.grade_user, name="grade_user"), + url(r'^manage/gradeuser/(?P\d+)/(?P\d+)/(?P\d+)/$', + views.grade_user, name="grade_user"), + url(r'^manage/questions/$', views.show_all_questions, name="show_questions"), + url(r'^manage/monitor/$', views.monitor, name="monitor"), + url(r'^manage/monitor/(?P\d+)/$', views.monitor, name="monitor"), url(r'^manage/user_data/(?P\d+)/(?P\d+)/$', - views.user_data), + views.user_data, name="user_data"), url(r'^manage/user_data/(?P\d+)/$', views.user_data), url(r'^manage/quiz/designquestionpaper/(?P\d+)/$', views.design_questionpaper, name='design_questionpaper'), url(r'^manage/designquestionpaper/(?P\d+)/(?P\d+)/$', views.design_questionpaper, name='designquestionpaper'), url(r'^manage/statistics/question/(?P\d+)/$', - views.show_statistics), + views.show_statistics, name="show_statistics"), url(r'^manage/statistics/question/(?P\d+)/(?P\d+)/$', - views.show_statistics), + views.show_statistics, name="show_statistics"), url(r'^manage/monitor/download_csv/(?P\d+)/$', - views.download_csv), + views.download_csv, name="download_csv"), url(r'^manage/duplicate_course/(?P\d+)/$', views.duplicate_course, name='duplicate_course'), url(r'manage/courses/$', views.courses, name='courses'), url(r'manage/add_course/$', views.add_course, name='add_course'), url(r'manage/edit_course/(?P\d+)$', views.add_course, name='edit_course'), url(r'manage/course_detail/(?P\d+)/$', views.course_detail, name='course_detail'), - url(r'manage/enroll/(?P\d+)/(?P\d+)/$', views.enroll), + url(r'manage/enroll/(?P\d+)/(?P\d+)/$', views.enroll, + name="enroll_user"), url(r'manage/enroll/rejected/(?P\d+)/(?P\d+)/$', views.enroll, {'was_rejected': True}), - url(r'manage/reject/(?P\d+)/(?P\d+)/$', views.reject), + url(r'manage/reject/(?P\d+)/(?P\d+)/$', views.reject, + name="reject_user"), url(r'manage/enrolled/reject/(?P\d+)/(?P\d+)/$', - views.reject, {'was_enrolled': True}), - url(r'manage/toggle_status/(?P\d+)/$', views.toggle_course_status), - url(r'^ajax/questions/filter/$', views.ajax_questions_filter), + views.reject, {'was_enrolled': True}, name="reject_user"), + url(r'manage/toggle_status/(?P\d+)/$', views.toggle_course_status, + name="toggle_course_status"), + url(r'^ajax/questions/filter/$', views.ajax_questions_filter, + name="questions_filter"), url(r'^editprofile/$', views.edit_profile, name='edit_profile'), url(r'^viewprofile/$', views.view_profile, name='view_profile'), - url(r'^manage/enroll/(?P\d+)/$', views.enroll), + url(r'^manage/enroll/(?P\d+)/$', views.enroll, name="enroll_users"), url(r'manage/enroll/rejected/(?P\d+)/$', views.enroll, {'was_rejected': True}), url(r'manage/enrolled/reject/(?P\d+)/$', - views.reject, {'was_enrolled': True}), + views.reject, {'was_enrolled': True}, name="reject_users"), url(r'^manage/searchteacher/(?P\d+)/$', views.search_teacher), url(r'^manage/addteacher/(?P\d+)/$', views.add_teacher, name='add_teacher'), url(r'^manage/remove_teachers/(?P\d+)/$', views.remove_teachers, name='remove_teacher'), - url(r'^manage/download_questions/$', views.show_all_questions), - url(r'^manage/upload_questions/$', views.show_all_questions), + url(r'^manage/download_questions/$', views.show_all_questions, + name="show_questions"), + url(r'^manage/upload_questions/$', views.show_all_questions, + name="show_questions"), url(r'^manage/grader/$', views.grader, name='grader'), url(r'^manage/regrade/question/(?P\d+)/(?P\d+)/$', views.regrade, name='regrade'), @@ -97,9 +101,9 @@ urlpatterns = [ url(r'^manage/(?P[\w\-]+)/(?P\d+)/$', views.test_quiz), url(r'^manage/create_demo_course/$', views.create_demo_course), url(r'^manage/courses/download_course_csv/(?P\d+)/$', - views.download_course_csv), + views.download_course_csv, name="download_course_csv"), url(r'^manage/download/user_assignment/(?P\d+)/(?P\d+)/(?P\d+)/$', - views.download_assignment_file), + views.download_assignment_file, name="download_user_assignment"), url(r'^manage/download/quiz_assignments/(?P\d+)/$', - views.download_assignment_file) + views.download_assignment_file, name="download_quiz_assignment") ] -- cgit