Files
edx-platform/lms/djangoapps/certificates/urls.py
Ned Batchelder 2171ddb9df URL patterns should be anchored. SEC-367
Some notes:

* The completion API was pulled out into a new repo, but left behind a
  url() entry.  That entry used a different namespace than the
  pulled-out repo, so I had to fix the one place we used the namespace.

* Two urls couldn't be anchored because they broke tests:

    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'),
2019-04-23 09:19:23 -04:00

32 lines
1.1 KiB
Python

"""
URLs for the certificates app.
"""
from django.conf import settings
from django.conf.urls import url
from lms.djangoapps.certificates import views
app_name = 'certificates'
urlpatterns = [
# Certificates HTML view end point to render web certs by user and course
url(
r'^user/(?P<user_id>[^/]*)/course/{course_id}'.format(course_id=settings.COURSE_ID_PATTERN),
views.render_html_view,
name='html_view'
),
# Certificates HTML view end point to render web certs by certificate_uuid
url(
r'^(?P<certificate_uuid>[0-9a-f]{32})$',
views.render_cert_by_uuid,
name='render_cert_by_uuid'
),
# End-points used by student support
# The views in the lms/djangoapps/support use these end-points
# to retrieve certificate information and regenerate certificates.
url(r'^search', views.search_certificates, name="search"),
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"),
]