URL priority problem
authorCharles Connell <charles@connells.org>
Thu, 16 Jan 2014 16:38:19 +0000 (11:38 -0500)
committerCharles Connell <charles@connells.org>
Thu, 16 Jan 2014 16:38:19 +0000 (11:38 -0500)
karmaworld/urls.py

index 2f1def013f1b24e733059b4d6d21200fcd454b0c..5550b7d54406fd2cd1681f0e830f003db464c869 100644 (file)
@@ -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<school_slug>[^/]+)/(?P<course_slug>[^/]+)/(?P<slug>[^/]+)$', \
     #    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'),
 )