# Multicourse wiki (Note: wiki urls must be above the courseware ones because of # the custom tab catch-all) if settings.WIKI_ENABLED: from wiki.urls import get_pattern as wiki_pattern from django_notify.urls import get_pattern as notify_pattern # Note that some of these urls are repeated in course_wiki.course_nav. Make sure to update # them together. urlpatterns += ( # First we include views from course_wiki that we use to override the default views. # They come first in the urlpatterns so they get resolved first url('^wiki/create-root/$', 'course_wiki.views.root_create', name='root_create'), url(r'^wiki/', include(wiki_pattern())), url(r'^notify/', include(notify_pattern())), # These urls are for viewing the wiki in the context of a course. They should # never be returned by a reverse() so they come after the other url patterns url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/course_wiki/?$', 'course_wiki.views.course_wiki_redirect', name="course_wiki"), url(r'^courses/(?:[^/]+/[^/]+/[^/]+)/wiki/', include(wiki_pattern())), ) if settings.COURSEWARE_ENABLED: urlpatterns += ( url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/jump_to/(?P<location>.*)$', 'courseware.views.jump_to', name="jump_to"), url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/jump_to_id/(?P<module_id>.*)$',
{'url': mktg_url}, name=mktg_name), ) # Multicourse wiki (Note: wiki urls must be above the courseware ones because of # the custom tab catch-all) if settings.WIKI_ENABLED: from wiki.urls import get_pattern as wiki_pattern from django_notify.urls import get_pattern as notify_pattern urlpatterns += ( # First we include views from course_wiki that we use to override the default views. # They come first in the urlpatterns so they get resolved first url('^wiki/create-root/$', 'course_wiki.views.root_create', name='root_create'), url(r'^wiki/', include(wiki_pattern())), url(r'^notify/', include(notify_pattern())), # These urls are for viewing the wiki in the context of a course. They should # never be returned by a reverse() so they come after the other url patterns url(r'^courses/{}/course_wiki/?$'.format(settings.COURSE_ID_PATTERN), 'course_wiki.views.course_wiki_redirect', name="course_wiki"), url(r'^courses/{}/wiki/'.format(settings.COURSE_KEY_REGEX), include(wiki_pattern())), ) if settings.COURSEWARE_ENABLED: urlpatterns += ( url(r'^courses/{}/jump_to/(?P<location>.*)$'.format(settings.COURSE_ID_PATTERN), 'courseware.views.jump_to', name="jump_to"), url(r'^courses/{}/jump_to_id/(?P<module_id>.*)$'.format(settings.COURSE_ID_PATTERN), 'courseware.views.jump_to_id', name="jump_to_id"), url(r'^courses/{course_key}/xblock/{usage_key}/handler/(?P<handler>[^/]*)(?:/(?P<suffix>.*))?$'.format(course_key=settings.COURSE_ID_PATTERN, usage_key=settings.USAGE_ID_PATTERN),
url(r"^%s$" % key.lower(), "static_template_view.views.render", {"template": template}, name=value), ) # Multicourse wiki (Note: wiki urls must be above the courseware ones because of # the custom tab catch-all) if settings.WIKI_ENABLED: from wiki.urls import get_pattern as wiki_pattern from django_notify.urls import get_pattern as notify_pattern urlpatterns += ( # First we include views from course_wiki that we use to override the default views. # They come first in the urlpatterns so they get resolved first url("^wiki/create-root/$", "course_wiki.views.root_create", name="root_create"), url(r"^wiki/", include(wiki_pattern())), url(r"^notify/", include(notify_pattern())), # These urls are for viewing the wiki in the context of a course. They should # never be returned by a reverse() so they come after the other url patterns url( r"^courses/{}/course_wiki/?$".format(settings.COURSE_ID_PATTERN), "course_wiki.views.course_wiki_redirect", name="course_wiki", ), url(r"^courses/{}/wiki/".format(settings.COURSE_KEY_REGEX), include(wiki_pattern())), ) if settings.COURSEWARE_ENABLED: COURSE_URLS = patterns( "", url( r"^look_up_registration_code$",
urlpatterns += [ url( r'^favicon\.ico$', RedirectView.as_view(url=settings.STATIC_URL + favicon_path, permanent=True)), ] # Multicourse wiki (Note: wiki urls must be above the courseware ones because of # the custom tab catch-all) if settings.WIKI_ENABLED: from wiki.urls import get_pattern as wiki_pattern from lms.djangoapps.course_wiki import views as course_wiki_views from django_notify.urls import get_pattern as notify_pattern wiki_url_patterns, wiki_app_name = wiki_pattern() notify_url_patterns, notify_app_name = notify_pattern() urlpatterns += [ # First we include views from course_wiki that we use to override the default views. # They come first in the urlpatterns so they get resolved first url('^wiki/create-root/$', course_wiki_views.root_create, name='root_create'), url(r'^wiki/', include((wiki_url_patterns, wiki_app_name), namespace='wiki')), url( r'^notify/', include((notify_url_patterns, notify_app_name), namespace='notify')), # These urls are for viewing the wiki in the context of a course. They should
urlpatterns += [ url( r'^favicon\.ico$', RedirectView.as_view(url=settings.STATIC_URL + favicon_path, permanent=True)), ] # Multicourse wiki (Note: wiki urls must be above the courseware ones because of # the custom tab catch-all) if settings.WIKI_ENABLED: from wiki.urls import get_pattern as wiki_pattern from course_wiki import views as course_wiki_views from django_notify.urls import get_pattern as notify_pattern wiki_url_patterns, wiki_app_name, wiki_namespace = wiki_pattern() notify_url_patterns, notify_app_name, notify_namespace = notify_pattern() urlpatterns += [ # First we include views from course_wiki that we use to override the default views. # They come first in the urlpatterns so they get resolved first url('^wiki/create-root/$', course_wiki_views.root_create, name='root_create'), url( r'^wiki/', include((wiki_url_patterns, wiki_app_name), namespace=wiki_namespace)), url( r'^notify/', include((notify_url_patterns, notify_app_name), namespace=notify_namespace)),