Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
6a336c0c
Unverified
Commit
6a336c0c
authored
Nov 06, 2017
by
Brian Mesick
Committed by
GitHub
Nov 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16454 from edx/bmedx/django111_urls_lms_2
LMS urls cleanup pt. 2
parents
5332b692
11a40307
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
171 additions
and
199 deletions
+171
-199
lms/djangoapps/badges/api/urls.py
+3
-4
lms/djangoapps/branding/api_urls.py
+5
-9
lms/djangoapps/bulk_enroll/urls.py
+3
-4
lms/djangoapps/ccx/api/urls.py
+6
-5
lms/djangoapps/ccx/api/v0/urls.py
+8
-9
lms/djangoapps/ccx/urls.py
+15
-24
lms/djangoapps/certificates/apis/urls.py
+6
-5
lms/djangoapps/certificates/apis/v0/urls.py
+8
-9
lms/djangoapps/certificates/urls.py
+3
-6
lms/djangoapps/class_dashboard/urls.py
+12
-12
lms/djangoapps/commerce/api/urls.py
+6
-5
lms/djangoapps/commerce/api/v0/urls.py
+8
-8
lms/djangoapps/commerce/api/v1/urls.py
+7
-10
lms/djangoapps/commerce/urls.py
+3
-5
lms/djangoapps/course_api/blocks/urls.py
+3
-4
lms/djangoapps/course_api/urls.py
+3
-4
lms/djangoapps/course_goals/urls.py
+3
-4
lms/djangoapps/course_structure_api/urls.py
+3
-4
lms/djangoapps/course_structure_api/v0/urls.py
+3
-4
lms/djangoapps/dashboard/sysadmin_urls.py
+3
-4
lms/djangoapps/discussion/urls.py
+11
-12
lms/djangoapps/discussion_api/urls.py
+3
-4
lms/djangoapps/django_comment_client/base/urls.py
+34
-31
lms/djangoapps/django_comment_client/urls.py
+3
-5
lms/djangoapps/edxnotes/urls.py
+9
-8
No files found.
lms/djangoapps/badges/api/urls.py
View file @
6a336c0c
...
@@ -2,11 +2,10 @@
...
@@ -2,11 +2,10 @@
URLs for badges API
URLs for badges API
"""
"""
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
.views
import
UserBadgeAssertions
from
.views
import
UserBadgeAssertions
urlpatterns
=
patterns
(
urlpatterns
=
[
'badges.api'
,
url
(
'^assertions/user/'
+
settings
.
USERNAME_PATTERN
+
'/$'
,
UserBadgeAssertions
.
as_view
(),
name
=
'user_assertions'
),
url
(
'^assertions/user/'
+
settings
.
USERNAME_PATTERN
+
'/$'
,
UserBadgeAssertions
.
as_view
(),
name
=
'user_assertions'
),
)
]
lms/djangoapps/branding/api_urls.py
View file @
6a336c0c
...
@@ -2,14 +2,10 @@
...
@@ -2,14 +2,10 @@
Branding API endpoint urls.
Branding API endpoint urls.
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
urlpatterns
=
patterns
(
from
branding.views
import
footer
""
,
url
(
urlpatterns
=
[
r"^footer$"
,
url
(
r"^footer$"
,
footer
,
name
=
"branding_footer"
),
"branding.views.footer"
,
]
name
=
"branding_footer"
,
),
)
lms/djangoapps/bulk_enroll/urls.py
View file @
6a336c0c
"""
"""
URLs for the Bulk Enrollment API
URLs for the Bulk Enrollment API
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
bulk_enroll.views
import
BulkEnrollView
from
bulk_enroll.views
import
BulkEnrollView
urlpatterns
=
patterns
(
urlpatterns
=
[
'bulk_enroll.views'
,
url
(
r'^bulk_enroll'
,
BulkEnrollView
.
as_view
(),
name
=
'bulk_enroll'
),
url
(
r'^bulk_enroll'
,
BulkEnrollView
.
as_view
(),
name
=
'bulk_enroll'
),
)
]
lms/djangoapps/ccx/api/urls.py
View file @
6a336c0c
""" CCX API URLs. """
"""
from
django.conf.urls
import
include
,
patterns
,
url
CCX API URLs.
"""
from
django.conf.urls
import
include
,
url
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^v0/'
,
include
(
'lms.djangoapps.ccx.api.v0.urls'
,
namespace
=
'v0'
)),
url
(
r'^v0/'
,
include
(
'lms.djangoapps.ccx.api.v0.urls'
,
namespace
=
'v0'
)),
)
]
lms/djangoapps/ccx/api/v0/urls.py
View file @
6a336c0c
""" CCX API v0 URLs. """
"""
CCX API v0 URLs.
"""
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
include
,
patterns
,
url
from
django.conf.urls
import
include
,
url
from
lms.djangoapps.ccx.api.v0
import
views
from
lms.djangoapps.ccx.api.v0
import
views
CCX_COURSE_ID_PATTERN
=
settings
.
COURSE_ID_PATTERN
.
replace
(
'course_id'
,
'ccx_course_id'
)
CCX_COURSE_ID_PATTERN
=
settings
.
COURSE_ID_PATTERN
.
replace
(
'course_id'
,
'ccx_course_id'
)
CCX_URLS
=
patterns
(
CCX_URLS
=
[
''
,
url
(
r'^$'
,
views
.
CCXListView
.
as_view
(),
name
=
'list'
),
url
(
r'^$'
,
views
.
CCXListView
.
as_view
(),
name
=
'list'
),
url
(
r'^{}/?$'
.
format
(
CCX_COURSE_ID_PATTERN
),
views
.
CCXDetailView
.
as_view
(),
name
=
'detail'
),
url
(
r'^{}/?$'
.
format
(
CCX_COURSE_ID_PATTERN
),
views
.
CCXDetailView
.
as_view
(),
name
=
'detail'
),
)
]
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^ccx/'
,
include
(
CCX_URLS
,
namespace
=
'ccx'
)),
url
(
r'^ccx/'
,
include
(
CCX_URLS
,
namespace
=
'ccx'
)),
)
]
lms/djangoapps/ccx/urls.py
View file @
6a336c0c
"""
"""
URLs for the CCX Feature.
URLs for the CCX Feature.
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
urlpatterns
=
patterns
(
import
ccx.views
''
,
url
(
r'^ccx_coach$'
,
urlpatterns
=
[
'ccx.views.dashboard'
,
name
=
'ccx_coach_dashboard'
),
url
(
r'^ccx_coach$'
,
ccx
.
views
.
dashboard
,
name
=
'ccx_coach_dashboard'
),
url
(
r'^create_ccx$'
,
url
(
r'^create_ccx$'
,
ccx
.
views
.
create_ccx
,
name
=
'create_ccx'
),
'ccx.views.create_ccx'
,
name
=
'create_ccx'
),
url
(
r'^save_ccx$'
,
ccx
.
views
.
save_ccx
,
name
=
'save_ccx'
),
url
(
r'^save_ccx$'
,
url
(
r'^ccx_invite$'
,
ccx
.
views
.
ccx_invite
,
name
=
'ccx_invite'
),
'ccx.views.save_ccx'
,
name
=
'save_ccx'
),
url
(
r'^ccx_schedule$'
,
ccx
.
views
.
ccx_schedule
,
name
=
'ccx_schedule'
),
url
(
r'^ccx_invite$'
,
url
(
r'^ccx_manage_student$'
,
ccx
.
views
.
ccx_student_management
,
name
=
'ccx_manage_student'
),
'ccx.views.ccx_invite'
,
name
=
'ccx_invite'
),
url
(
r'^ccx_schedule$'
,
'ccx.views.ccx_schedule'
,
name
=
'ccx_schedule'
),
url
(
r'^ccx_manage_student$'
,
'ccx.views.ccx_student_management'
,
name
=
'ccx_manage_student'
),
# Grade book
# Grade book
url
(
r'^ccx_gradebook$'
,
url
(
r'^ccx_gradebook$'
,
ccx
.
views
.
ccx_gradebook
,
name
=
'ccx_gradebook'
),
'ccx.views.ccx_gradebook'
,
name
=
'ccx_gradebook'
),
url
(
r'^ccx_gradebook/(?P<offset>[0-9]+)$'
,
ccx
.
views
.
ccx_gradebook
,
name
=
'ccx_gradebook'
),
url
(
r'^ccx_gradebook/(?P<offset>[0-9]+)$'
,
'ccx.views.ccx_gradebook'
,
name
=
'ccx_gradebook'
),
url
(
r'^ccx_grades.csv$'
,
url
(
r'^ccx_grades.csv$'
,
ccx
.
views
.
ccx_grades_csv
,
name
=
'ccx_grades_csv'
),
'ccx.views.ccx_grades_csv'
,
name
=
'ccx_grades_csv'
),
url
(
r'^ccx_set_grading_policy$'
,
ccx
.
views
.
set_grading_policy
,
name
=
'ccx_set_grading_policy'
),
url
(
r'^ccx_set_grading_policy$'
,
]
'ccx.views.set_grading_policy'
,
name
=
'ccx_set_grading_policy'
),
)
lms/djangoapps/certificates/apis/urls.py
View file @
6a336c0c
""" Certificates API URLs. """
"""
from
django.conf.urls
import
include
,
patterns
,
url
Certificates API URLs.
"""
from
django.conf.urls
import
include
,
url
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^v0/'
,
include
(
'lms.djangoapps.certificates.apis.v0.urls'
,
namespace
=
'v0'
)),
url
(
r'^v0/'
,
include
(
'lms.djangoapps.certificates.apis.v0.urls'
,
namespace
=
'v0'
)),
)
]
lms/djangoapps/certificates/apis/v0/urls.py
View file @
6a336c0c
""" Certificates API v0 URLs. """
"""
Certificates API v0 URLs.
"""
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
include
,
patterns
,
url
from
django.conf.urls
import
include
,
url
from
lms.djangoapps.certificates.apis.v0
import
views
from
lms.djangoapps.certificates.apis.v0
import
views
CERTIFICATES_URLS
=
patterns
(
CERTIFICATES_URLS
=
[
''
,
url
(
url
(
r'^{username}/courses/{course_id}/$'
.
format
(
r'^{username}/courses/{course_id}/$'
.
format
(
username
=
settings
.
USERNAME_PATTERN
,
username
=
settings
.
USERNAME_PATTERN
,
...
@@ -14,9 +14,8 @@ CERTIFICATES_URLS = patterns(
...
@@ -14,9 +14,8 @@ CERTIFICATES_URLS = patterns(
),
),
views
.
CertificatesDetailView
.
as_view
(),
name
=
'detail'
views
.
CertificatesDetailView
.
as_view
(),
name
=
'detail'
),
),
)
]
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^certificates/'
,
include
(
CERTIFICATES_URLS
,
namespace
=
'certificates'
)),
url
(
r'^certificates/'
,
include
(
CERTIFICATES_URLS
,
namespace
=
'certificates'
)),
)
]
lms/djangoapps/certificates/urls.py
View file @
6a336c0c
"""
"""
URLs for the certificates app.
URLs for the certificates app.
"""
"""
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
certificates
import
views
from
certificates
import
views
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
# Certificates HTML view end point to render web certs by user and course
# Certificates HTML view end point to render web certs by user and course
url
(
url
(
r'^user/(?P<user_id>[^/]*)/course/{course_id}'
.
format
(
course_id
=
settings
.
COURSE_ID_PATTERN
),
r'^user/(?P<user_id>[^/]*)/course/{course_id}'
.
format
(
course_id
=
settings
.
COURSE_ID_PATTERN
),
...
@@ -30,4 +27,4 @@ urlpatterns = patterns(
...
@@ -30,4 +27,4 @@ urlpatterns = patterns(
url
(
r'search'
,
views
.
search_certificates
,
name
=
"search"
),
url
(
r'search'
,
views
.
search_certificates
,
name
=
"search"
),
url
(
r'regenerate'
,
views
.
regenerate_certificate_for_user
,
name
=
"regenerate_certificate_for_user"
),
url
(
r'regenerate'
,
views
.
regenerate_certificate_for_user
,
name
=
"regenerate_certificate_for_user"
),
url
(
r'generate'
,
views
.
generate_certificate_for_user
,
name
=
"generate_certificate_for_user"
),
url
(
r'generate'
,
views
.
generate_certificate_for_user
,
name
=
"generate_certificate_for_user"
),
)
]
lms/djangoapps/class_dashboard/urls.py
View file @
6a336c0c
"""
"""
Class Dashboard API endpoint urls.
Class Dashboard API endpoint urls.
"""
"""
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
COURSE_ID_PATTERN
=
settings
.
COURSE_ID_PATTERN
import
class_dashboard.views
import
class_dashboard.dashboard_data
urlpatterns
=
patterns
(
COURSE_ID_PATTERN
=
settings
.
COURSE_ID_PATTERN
''
,
urlpatterns
=
[
# Json request data for metrics for entire course
# Json request data for metrics for entire course
url
(
r'^{}/all_sequential_open_distrib$'
.
format
(
settings
.
COURSE_ID_PATTERN
),
url
(
r'^{}/all_sequential_open_distrib$'
.
format
(
settings
.
COURSE_ID_PATTERN
),
'class_dashboard.views.all_sequential_open_distrib'
,
name
=
"all_sequential_open_distrib"
),
class_dashboard
.
views
.
all_sequential_open_distrib
,
name
=
"all_sequential_open_distrib"
),
url
(
r'^{}/all_problem_grade_distribution$'
.
format
(
settings
.
COURSE_ID_PATTERN
),
url
(
r'^{}/all_problem_grade_distribution$'
.
format
(
settings
.
COURSE_ID_PATTERN
),
'class_dashboard.views.all_problem_grade_distribution'
,
name
=
"all_problem_grade_distribution"
),
class_dashboard
.
views
.
all_problem_grade_distribution
,
name
=
"all_problem_grade_distribution"
),
# Json request data for metrics for particular section
# Json request data for metrics for particular section
url
(
r'^{}/problem_grade_distribution/(?P<section>\d+)$'
.
format
(
settings
.
COURSE_ID_PATTERN
),
url
(
r'^{}/problem_grade_distribution/(?P<section>\d+)$'
.
format
(
settings
.
COURSE_ID_PATTERN
),
'class_dashboard.views.section_problem_grade_distrib'
,
name
=
"section_problem_grade_distrib"
),
class_dashboard
.
views
.
section_problem_grade_distrib
,
name
=
"section_problem_grade_distrib"
),
# For listing students that opened a sub-section
# For listing students that opened a sub-section
url
(
r'^get_students_opened_subsection$'
,
url
(
r'^get_students_opened_subsection$'
,
'class_dashboard.dashboard_data.get_students_opened_subsection'
,
name
=
"get_students_opened_subsection"
),
class_dashboard
.
dashboard_data
.
get_students_opened_subsection
,
name
=
"get_students_opened_subsection"
),
# For listing of students' grade per problem
# For listing of students' grade per problem
url
(
r'^get_students_problem_grades$'
,
url
(
r'^get_students_problem_grades$'
,
'class_dashboard.dashboard_data.get_students_problem_grades'
,
name
=
"get_students_problem_grades"
),
class_dashboard
.
dashboard_data
.
get_students_problem_grades
,
name
=
"get_students_problem_grades"
),
# For generating metrics data as a csv
# For generating metrics data as a csv
url
(
r'^post_metrics_data_csv_url'
,
url
(
r'^post_metrics_data_csv_url'
,
'class_dashboard.dashboard_data.post_metrics_data_csv'
,
name
=
"post_metrics_data_csv"
),
class_dashboard
.
dashboard_data
.
post_metrics_data_csv
,
name
=
"post_metrics_data_csv"
),
)
]
lms/djangoapps/commerce/api/urls.py
View file @
6a336c0c
""" API URLs. """
"""
from
django.conf.urls
import
include
,
patterns
,
url
API URLs.
"""
from
django.conf.urls
import
include
,
url
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^v0/'
,
include
(
'commerce.api.v0.urls'
,
namespace
=
'v0'
)),
url
(
r'^v0/'
,
include
(
'commerce.api.v0.urls'
,
namespace
=
'v0'
)),
url
(
r'^v1/'
,
include
(
'commerce.api.v1.urls'
,
namespace
=
'v1'
)),
url
(
r'^v1/'
,
include
(
'commerce.api.v1.urls'
,
namespace
=
'v1'
)),
)
]
lms/djangoapps/commerce/api/v0/urls.py
View file @
6a336c0c
""" API v0 URLs. """
"""
from
django.conf.urls
import
include
,
patterns
,
url
API v0 URLs.
"""
from
django.conf.urls
import
include
,
url
from
commerce.api.v0
import
views
from
commerce.api.v0
import
views
BASKET_URLS
=
patterns
(
BASKET_URLS
=
[
''
,
url
(
r'^$'
,
views
.
BasketsView
.
as_view
(),
name
=
'create'
),
url
(
r'^$'
,
views
.
BasketsView
.
as_view
(),
name
=
'create'
),
url
(
r'^(?P<basket_id>[\w]+)/order/$'
,
views
.
BasketOrderView
.
as_view
(),
name
=
'retrieve_order'
),
url
(
r'^(?P<basket_id>[\w]+)/order/$'
,
views
.
BasketOrderView
.
as_view
(),
name
=
'retrieve_order'
),
)
]
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^baskets/'
,
include
(
BASKET_URLS
,
namespace
=
'baskets'
)),
url
(
r'^baskets/'
,
include
(
BASKET_URLS
,
namespace
=
'baskets'
)),
)
]
lms/djangoapps/commerce/api/v1/urls.py
View file @
6a336c0c
""" API v1 URLs. """
""" API v1 URLs. """
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
include
,
patterns
,
url
from
django.conf.urls
import
include
,
url
from
commerce.api.v1
import
views
from
commerce.api.v1
import
views
COURSE_URLS
=
patterns
(
COURSE_URLS
=
[
''
,
url
(
r'^$'
,
views
.
CourseListView
.
as_view
(),
name
=
'list'
),
url
(
r'^$'
,
views
.
CourseListView
.
as_view
(),
name
=
'list'
),
url
(
r'^{}/$'
.
format
(
settings
.
COURSE_ID_PATTERN
),
views
.
CourseRetrieveUpdateView
.
as_view
(),
name
=
'retrieve_update'
),
url
(
r'^{}/$'
.
format
(
settings
.
COURSE_ID_PATTERN
),
views
.
CourseRetrieveUpdateView
.
as_view
(),
name
=
'retrieve_update'
),
)
]
ORDER_URLS
=
patterns
(
ORDER_URLS
=
[
''
,
url
(
r'^(?P<number>[-\w]+)/$'
,
views
.
OrderView
.
as_view
(),
name
=
'detail'
),
url
(
r'^(?P<number>[-\w]+)/$'
,
views
.
OrderView
.
as_view
(),
name
=
'detail'
),
)
]
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^courses/'
,
include
(
COURSE_URLS
,
namespace
=
'courses'
)),
url
(
r'^courses/'
,
include
(
COURSE_URLS
,
namespace
=
'courses'
)),
url
(
r'^orders/'
,
include
(
ORDER_URLS
,
namespace
=
'orders'
)),
url
(
r'^orders/'
,
include
(
ORDER_URLS
,
namespace
=
'orders'
)),
)
]
lms/djangoapps/commerce/urls.py
View file @
6a336c0c
"""
"""
Defines the URL routes for this app.
Defines the URL routes for this app.
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
commerce
import
views
from
commerce
import
views
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^checkout/cancel/$'
,
views
.
checkout_cancel
,
name
=
'checkout_cancel'
),
url
(
r'^checkout/cancel/$'
,
views
.
checkout_cancel
,
name
=
'checkout_cancel'
),
url
(
r'^checkout/error/$'
,
views
.
checkout_error
,
name
=
'checkout_error'
),
url
(
r'^checkout/error/$'
,
views
.
checkout_error
,
name
=
'checkout_error'
),
url
(
r'^checkout/receipt/$'
,
views
.
checkout_receipt
,
name
=
'checkout_receipt'
),
url
(
r'^checkout/receipt/$'
,
views
.
checkout_receipt
,
name
=
'checkout_receipt'
),
url
(
r'^checkout/verification_status/$'
,
views
.
user_verification_status
,
name
=
'user_verification_status'
),
url
(
r'^checkout/verification_status/$'
,
views
.
user_verification_status
,
name
=
'user_verification_status'
),
]
)
lms/djangoapps/course_api/blocks/urls.py
View file @
6a336c0c
...
@@ -2,12 +2,11 @@
...
@@ -2,12 +2,11 @@
Course Block API URLs
Course Block API URLs
"""
"""
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
.views
import
BlocksInCourseView
,
BlocksView
from
.views
import
BlocksInCourseView
,
BlocksView
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
# This endpoint requires the usage_key for the starting block.
# This endpoint requires the usage_key for the starting block.
url
(
url
(
r'^v1/blocks/{}'
.
format
(
settings
.
USAGE_KEY_PATTERN
),
r'^v1/blocks/{}'
.
format
(
settings
.
USAGE_KEY_PATTERN
),
...
@@ -21,4 +20,4 @@ urlpatterns = patterns(
...
@@ -21,4 +20,4 @@ urlpatterns = patterns(
BlocksInCourseView
.
as_view
(),
BlocksInCourseView
.
as_view
(),
name
=
"blocks_in_course"
name
=
"blocks_in_course"
),
),
)
]
lms/djangoapps/course_api/urls.py
View file @
6a336c0c
...
@@ -2,13 +2,12 @@
...
@@ -2,13 +2,12 @@
Course API URLs
Course API URLs
"""
"""
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
include
,
patterns
,
url
from
django.conf.urls
import
include
,
url
from
.views
import
CourseDetailView
,
CourseListView
from
.views
import
CourseDetailView
,
CourseListView
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^v1/courses/$'
,
CourseListView
.
as_view
(),
name
=
"course-list"
),
url
(
r'^v1/courses/$'
,
CourseListView
.
as_view
(),
name
=
"course-list"
),
url
(
r'^v1/courses/{}'
.
format
(
settings
.
COURSE_KEY_PATTERN
),
CourseDetailView
.
as_view
(),
name
=
"course-detail"
),
url
(
r'^v1/courses/{}'
.
format
(
settings
.
COURSE_KEY_PATTERN
),
CourseDetailView
.
as_view
(),
name
=
"course-detail"
),
url
(
r''
,
include
(
'course_api.blocks.urls'
))
url
(
r''
,
include
(
'course_api.blocks.urls'
))
)
]
lms/djangoapps/course_goals/urls.py
View file @
6a336c0c
"""
"""
Course Goals URLs
Course Goals URLs
"""
"""
from
django.conf.urls
import
include
,
patterns
,
url
from
django.conf.urls
import
include
,
url
from
rest_framework
import
routers
from
rest_framework
import
routers
from
.views
import
CourseGoalViewSet
from
.views
import
CourseGoalViewSet
...
@@ -9,7 +9,6 @@ from .views import CourseGoalViewSet
...
@@ -9,7 +9,6 @@ from .views import CourseGoalViewSet
router
=
routers
.
DefaultRouter
()
router
=
routers
.
DefaultRouter
()
router
.
register
(
r'course_goals'
,
CourseGoalViewSet
,
base_name
=
'course_goal'
)
router
.
register
(
r'course_goals'
,
CourseGoalViewSet
,
base_name
=
'course_goal'
)
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^v0/'
,
include
(
router
.
urls
,
namespace
=
'v0'
)),
url
(
r'^v0/'
,
include
(
router
.
urls
,
namespace
=
'v0'
)),
)
]
lms/djangoapps/course_structure_api/urls.py
View file @
6a336c0c
...
@@ -3,9 +3,8 @@ Course Structure API URI specification.
...
@@ -3,9 +3,8 @@ Course Structure API URI specification.
Patterns here should simply point to version-specific patterns.
Patterns here should simply point to version-specific patterns.
"""
"""
from
django.conf.urls
import
include
,
patterns
,
url
from
django.conf.urls
import
include
,
url
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^v0/'
,
include
(
'course_structure_api.v0.urls'
,
namespace
=
'v0'
))
url
(
r'^v0/'
,
include
(
'course_structure_api.v0.urls'
,
namespace
=
'v0'
))
)
]
lms/djangoapps/course_structure_api/v0/urls.py
View file @
6a336c0c
...
@@ -2,14 +2,13 @@
...
@@ -2,14 +2,13 @@
Courses Structure API v0 URI specification
Courses Structure API v0 URI specification
"""
"""
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
course_structure_api.v0
import
views
from
course_structure_api.v0
import
views
COURSE_ID_PATTERN
=
settings
.
COURSE_ID_PATTERN
COURSE_ID_PATTERN
=
settings
.
COURSE_ID_PATTERN
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^courses/$'
,
views
.
CourseList
.
as_view
(),
name
=
'list'
),
url
(
r'^courses/$'
,
views
.
CourseList
.
as_view
(),
name
=
'list'
),
url
(
r'^courses/{}/$'
.
format
(
COURSE_ID_PATTERN
),
views
.
CourseDetail
.
as_view
(),
name
=
'detail'
),
url
(
r'^courses/{}/$'
.
format
(
COURSE_ID_PATTERN
),
views
.
CourseDetail
.
as_view
(),
name
=
'detail'
),
url
(
r'^course_structures/{}/$'
.
format
(
COURSE_ID_PATTERN
),
views
.
CourseStructure
.
as_view
(),
name
=
'structure'
),
url
(
r'^course_structures/{}/$'
.
format
(
COURSE_ID_PATTERN
),
views
.
CourseStructure
.
as_view
(),
name
=
'structure'
),
...
@@ -18,4 +17,4 @@ urlpatterns = patterns(
...
@@ -18,4 +17,4 @@ urlpatterns = patterns(
views
.
CourseGradingPolicy
.
as_view
(),
views
.
CourseGradingPolicy
.
as_view
(),
name
=
'grading_policy'
name
=
'grading_policy'
),
),
)
]
lms/djangoapps/dashboard/sysadmin_urls.py
View file @
6a336c0c
...
@@ -2,16 +2,15 @@
...
@@ -2,16 +2,15 @@
Urls for sysadmin dashboard feature
Urls for sysadmin dashboard feature
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
dashboard
import
sysadmin
from
dashboard
import
sysadmin
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^$'
,
sysadmin
.
Users
.
as_view
(),
name
=
"sysadmin"
),
url
(
r'^$'
,
sysadmin
.
Users
.
as_view
(),
name
=
"sysadmin"
),
url
(
r'^courses/?$'
,
sysadmin
.
Courses
.
as_view
(),
name
=
"sysadmin_courses"
),
url
(
r'^courses/?$'
,
sysadmin
.
Courses
.
as_view
(),
name
=
"sysadmin_courses"
),
url
(
r'^staffing/?$'
,
sysadmin
.
Staffing
.
as_view
(),
name
=
"sysadmin_staffing"
),
url
(
r'^staffing/?$'
,
sysadmin
.
Staffing
.
as_view
(),
name
=
"sysadmin_staffing"
),
url
(
r'^gitlogs/?$'
,
sysadmin
.
GitLogs
.
as_view
(),
name
=
"gitlogs"
),
url
(
r'^gitlogs/?$'
,
sysadmin
.
GitLogs
.
as_view
(),
name
=
"gitlogs"
),
url
(
r'^gitlogs/(?P<course_id>.+)$'
,
sysadmin
.
GitLogs
.
as_view
(),
url
(
r'^gitlogs/(?P<course_id>.+)$'
,
sysadmin
.
GitLogs
.
as_view
(),
name
=
"gitlogs_detail"
),
name
=
"gitlogs_detail"
),
)
]
lms/djangoapps/discussion/urls.py
View file @
6a336c0c
"""
"""
Forum urls for the django_comment_client.
Forum urls for the django_comment_client.
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
.views
import
DiscussionBoardFragmentView
from
discussion
import
views
urlpatterns
=
patterns
(
urlpatterns
=
[
'discussion.views'
,
url
(
r'users/(?P<user_id>\w+)/followed$'
,
views
.
followed_threads
,
name
=
'followed_threads'
),
url
(
r'users/(?P<user_id>\w+)$'
,
views
.
user_profile
,
name
=
'user_profile'
),
url
(
r'users/(?P<user_id>\w+)/followed$'
,
'followed_threads'
,
name
=
'followed_threads'
),
url
(
r'^(?P<discussion_id>[\w\-.]+)/threads/(?P<thread_id>\w+)$'
,
views
.
single_thread
,
url
(
r'users/(?P<user_id>\w+)$'
,
'user_profile'
,
name
=
'user_profile'
),
name
=
'single_thread'
),
url
(
r'^(?P<discussion_id>[\w\-.]+)/threads/(?P<thread_id>\w+)$'
,
'single_thread'
,
name
=
'single_thread'
),
url
(
r'^(?P<discussion_id>[\w\-.]+)/inline$'
,
views
.
inline_discussion
,
name
=
'inline_discussion'
),
url
(
r'^(?P<discussion_id>[\w\-.]+)/inline$'
,
'inline_discussion'
,
name
=
'inline_discussion'
),
url
(
url
(
r'discussion_board_fragment_view$'
,
r'discussion_board_fragment_view$'
,
DiscussionBoardFragmentView
.
as_view
(),
views
.
DiscussionBoardFragmentView
.
as_view
(),
name
=
'discussion_board_fragment_view'
name
=
'discussion_board_fragment_view'
),
),
url
(
r''
,
'forum_form_discussion'
,
name
=
'forum_form_discussion'
),
url
(
r''
,
views
.
forum_form_discussion
,
name
=
'forum_form_discussion'
),
)
]
lms/djangoapps/discussion_api/urls.py
View file @
6a336c0c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Discussion API URLs
Discussion API URLs
"""
"""
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
include
,
patterns
,
url
from
django.conf.urls
import
include
,
url
from
rest_framework.routers
import
SimpleRouter
from
rest_framework.routers
import
SimpleRouter
from
discussion_api.views
import
CommentViewSet
,
CourseTopicsView
,
CourseView
,
ThreadViewSet
from
discussion_api.views
import
CommentViewSet
,
CourseTopicsView
,
CourseView
,
ThreadViewSet
...
@@ -11,8 +11,7 @@ ROUTER = SimpleRouter()
...
@@ -11,8 +11,7 @@ ROUTER = SimpleRouter()
ROUTER
.
register
(
"threads"
,
ThreadViewSet
,
base_name
=
"thread"
)
ROUTER
.
register
(
"threads"
,
ThreadViewSet
,
base_name
=
"thread"
)
ROUTER
.
register
(
"comments"
,
CommentViewSet
,
base_name
=
"comment"
)
ROUTER
.
register
(
"comments"
,
CommentViewSet
,
base_name
=
"comment"
)
urlpatterns
=
patterns
(
urlpatterns
=
[
"discussion_api"
,
url
(
url
(
r"^v1/courses/{}"
.
format
(
settings
.
COURSE_ID_PATTERN
),
r"^v1/courses/{}"
.
format
(
settings
.
COURSE_ID_PATTERN
),
CourseView
.
as_view
(),
CourseView
.
as_view
(),
...
@@ -24,4 +23,4 @@ urlpatterns = patterns(
...
@@ -24,4 +23,4 @@ urlpatterns = patterns(
name
=
"course_topics"
name
=
"course_topics"
),
),
url
(
"^v1/"
,
include
(
ROUTER
.
urls
)),
url
(
"^v1/"
,
include
(
ROUTER
.
urls
)),
)
]
lms/djangoapps/django_comment_client/base/urls.py
View file @
6a336c0c
"""
"""
Base urls for the django_comment_client.
Base urls for the django_comment_client.
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
urlpatterns
=
patterns
(
from
django_comment_client.base
import
views
'django_comment_client.base.views'
,
url
(
r'upload$'
,
'upload'
,
name
=
'upload'
),
urlpatterns
=
[
url
(
r'threads/(?P<thread_id>[\w\-]+)/update$'
,
'update_thread'
,
name
=
'update_thread'
),
url
(
r'upload$'
,
views
.
upload
,
name
=
'upload'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/reply$'
,
'create_comment'
,
name
=
'create_comment'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/update$'
,
views
.
update_thread
,
name
=
'update_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/delete'
,
'delete_thread'
,
name
=
'delete_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/reply$'
,
views
.
create_comment
,
name
=
'create_comment'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/upvote$'
,
'vote_for_thread'
,
{
'value'
:
'up'
},
name
=
'upvote_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/delete'
,
views
.
delete_thread
,
name
=
'delete_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/downvote$'
,
'vote_for_thread'
,
{
'value'
:
'down'
},
name
=
'downvote_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/upvote$'
,
views
.
vote_for_thread
,
{
'value'
:
'up'
},
name
=
'upvote_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/flagAbuse$'
,
'flag_abuse_for_thread'
,
name
=
'flag_abuse_for_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/downvote$'
,
views
.
vote_for_thread
,
{
'value'
:
'down'
},
name
=
'downvote_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/unFlagAbuse$'
,
'un_flag_abuse_for_thread'
,
name
=
'un_flag_abuse_for_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/flagAbuse$'
,
views
.
flag_abuse_for_thread
,
name
=
'flag_abuse_for_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/unvote$'
,
'undo_vote_for_thread'
,
name
=
'undo_vote_for_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/unFlagAbuse$'
,
views
.
un_flag_abuse_for_thread
,
url
(
r'threads/(?P<thread_id>[\w\-]+)/pin$'
,
'pin_thread'
,
name
=
'pin_thread'
),
name
=
'un_flag_abuse_for_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/unpin$'
,
'un_pin_thread'
,
name
=
'un_pin_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/unvote$'
,
views
.
undo_vote_for_thread
,
name
=
'undo_vote_for_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/follow$'
,
'follow_thread'
,
name
=
'follow_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/pin$'
,
views
.
pin_thread
,
name
=
'pin_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/unfollow$'
,
'unfollow_thread'
,
name
=
'unfollow_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/unpin$'
,
views
.
un_pin_thread
,
name
=
'un_pin_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/close$'
,
'openclose_thread'
,
name
=
'openclose_thread'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/follow$'
,
views
.
follow_thread
,
name
=
'follow_thread'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/update$'
,
'update_comment'
,
name
=
'update_comment'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/unfollow$'
,
views
.
unfollow_thread
,
name
=
'unfollow_thread'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/endorse$'
,
'endorse_comment'
,
name
=
'endorse_comment'
),
url
(
r'threads/(?P<thread_id>[\w\-]+)/close$'
,
views
.
openclose_thread
,
name
=
'openclose_thread'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/reply$'
,
'create_sub_comment'
,
name
=
'create_sub_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/update$'
,
views
.
update_comment
,
name
=
'update_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/delete$'
,
'delete_comment'
,
name
=
'delete_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/endorse$'
,
views
.
endorse_comment
,
name
=
'endorse_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/upvote$'
,
'vote_for_comment'
,
{
'value'
:
'up'
},
name
=
'upvote_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/reply$'
,
views
.
create_sub_comment
,
name
=
'create_sub_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/downvote$'
,
'vote_for_comment'
,
{
'value'
:
'down'
},
name
=
'downvote_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/delete$'
,
views
.
delete_comment
,
name
=
'delete_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/unvote$'
,
'undo_vote_for_comment'
,
name
=
'undo_vote_for_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/upvote$'
,
views
.
vote_for_comment
,
{
'value'
:
'up'
},
name
=
'upvote_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/flagAbuse$'
,
'flag_abuse_for_comment'
,
name
=
'flag_abuse_for_comment'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/downvote$'
,
views
.
vote_for_comment
,
{
'value'
:
'down'
},
url
(
r'comments/(?P<comment_id>[\w\-]+)/unFlagAbuse$'
,
'un_flag_abuse_for_comment'
,
name
=
'un_flag_abuse_for_comment'
),
name
=
'downvote_comment'
),
url
(
r'^(?P<commentable_id>[\w\-.]+)/threads/create$'
,
'create_thread'
,
name
=
'create_thread'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/unvote$'
,
views
.
undo_vote_for_comment
,
name
=
'undo_vote_for_comment'
),
url
(
r'^(?P<commentable_id>[\w\-.]+)/follow$'
,
'follow_commentable'
,
name
=
'follow_commentable'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/flagAbuse$'
,
views
.
flag_abuse_for_comment
,
name
=
'flag_abuse_for_comment'
),
url
(
r'^(?P<commentable_id>[\w\-.]+)/unfollow$'
,
'unfollow_commentable'
,
name
=
'unfollow_commentable'
),
url
(
r'comments/(?P<comment_id>[\w\-]+)/unFlagAbuse$'
,
views
.
un_flag_abuse_for_comment
,
url
(
r'users$'
,
'users'
,
name
=
'users'
),
name
=
'un_flag_abuse_for_comment'
),
)
url
(
r'^(?P<commentable_id>[\w\-.]+)/threads/create$'
,
views
.
create_thread
,
name
=
'create_thread'
),
url
(
r'^(?P<commentable_id>[\w\-.]+)/follow$'
,
views
.
follow_commentable
,
name
=
'follow_commentable'
),
url
(
r'^(?P<commentable_id>[\w\-.]+)/unfollow$'
,
views
.
unfollow_commentable
,
name
=
'unfollow_commentable'
),
url
(
r'users$'
,
views
.
users
,
name
=
'users'
),
]
lms/djangoapps/django_comment_client/urls.py
View file @
6a336c0c
"""
"""
Urls for the django_comment_client.
Urls for the django_comment_client.
"""
"""
from
django.conf.urls
import
include
,
patterns
,
url
from
django.conf.urls
import
include
,
url
urlpatterns
=
patterns
(
''
,
urlpatterns
=
[
url
(
r''
,
include
(
'django_comment_client.base.urls'
)),
url
(
r''
,
include
(
'django_comment_client.base.urls'
)),
)
]
lms/djangoapps/edxnotes/urls.py
View file @
6a336c0c
"""
"""
URLs for EdxNotes.
URLs for EdxNotes.
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
edxnotes
import
views
# Additionally, we include login URLs for the browseable API.
# Additionally, we include login URLs for the browseable API.
urlpatterns
=
patterns
(
urlpatterns
=
[
"edxnotes.views"
,
url
(
r"^/$"
,
views
.
edxnotes
,
name
=
"edxnotes"
),
url
(
r"^/$"
,
"edxnotes"
,
name
=
"edxnotes"
),
url
(
r"^/notes/$"
,
views
.
notes
,
name
=
"notes"
),
url
(
r"^/notes/$"
,
"notes"
,
name
=
"notes"
),
url
(
r"^/token/$"
,
views
.
get_token
,
name
=
"get_token"
),
url
(
r"^/token/$"
,
"get_token"
,
name
=
"get_token"
),
url
(
r"^/visibility/$"
,
views
.
edxnotes_visibility
,
name
=
"edxnotes_visibility"
),
url
(
r"^/visibility/$"
,
"edxnotes_visibility"
,
name
=
"edxnotes_visibility"
),
]
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment