urls.py 1.07 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
"""
URLs for the certificates app.
"""

from django.conf.urls import patterns, url
from django.conf import settings

from certificates import views

urlpatterns = patterns(
    '',

13
    # Certificates HTML view end point to render web certs by user and course
14 15 16 17 18 19
    url(
        r'^user/(?P<user_id>[^/]*)/course/{course_id}'.format(course_id=settings.COURSE_ID_PATTERN),
        views.render_html_view,
        name='html_view'
    ),

20 21 22 23 24 25 26
    # 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'
    ),

27 28 29
    # End-points used by student support
    # The views in the lms/djangoapps/support use these end-points
    # to retrieve certificate information and regenerate certificates.
asadiqbal committed
30
    url(r'search', views.search_certificates, name="search"),
31
    url(r'regenerate', views.regenerate_certificate_for_user, name="regenerate_certificate_for_user"),
asadiqbal committed
32
    url(r'generate', views.generate_certificate_for_user, name="generate_certificate_for_user"),
33
)