From a6f25f83617d463de16e4e9346f65d07ef06a619 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Thu, 16 Jan 2014 11:38:19 -0500 Subject: [PATCH] URL priority problem --- karmaworld/urls.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/karmaworld/urls.py b/karmaworld/urls.py index 2f1def0..5550b7d 100644 --- a/karmaworld/urls.py +++ b/karmaworld/urls.py @@ -77,6 +77,18 @@ urlpatterns = patterns('', # Filepicker upload url(r'^api/upload$', save_fp_upload, name='upload_post'), + + # ---- JSON views ----# + # return json list of schools + url(r'^school/list/$', school_list, name='json_school_list'), + # return json list of courses for a given school + url(r'^school/course/list/$', school_course_list, name='json_school_course_list'), + # return json list of instructors for a given school and course + url(r'^school/course/instructors/list/$', school_course_instructor_list, name='json_school_course_instructor_list'), + # ---- end JSON views ----# + + url(r'^search/$', NoteSearchView.as_view(), name='note_search'), + # VIEW for displaying a single Course url(r'^' + SLUG.format('school_') + '/' + SLUG.format('') + '/$', CourseDetailView.as_view(), name='course_detail'), @@ -102,16 +114,5 @@ urlpatterns = patterns('', #url(r'^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)$', \ # NoteView.as_view(), name='note_detail'), - # ---- JSON views ----# - # return json list of schools - url(r'^school/list/$', school_list, name='json_school_list'), - # return json list of courses for a given school - url(r'^school/course/list/$', school_course_list, name='json_school_course_list'), - # return json list of instructors for a given school and course - url(r'^school/course/instructors/list/$', school_course_instructor_list, name='json_school_course_instructor_list'), - # ---- end JSON views ----# - - url(r'^search/$', NoteSearchView.as_view(), name='note_search'), - url(r'^$', CourseListView.as_view(model=Course), name='home'), ) -- 2.25.1