# 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'^{}$'.format(mktg_name), 'django.views.generic.simple.redirect_to', {'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"),
] # 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 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(app_name='course_wiki_do_not_reverse', namespace='course_wiki_do_not_reverse'))), ] COURSE_URLS = [
settings.FAVICON_PATH) # pylint: disable=invalid-name 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')),
] # 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 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())), ] COURSE_URLS = [ url( r'^look_up_registration_code$', instructor_registration_codes_views.look_up_registration_code,
if settings.PERFSTATS: urlpatterns += (url(r'^reprofile$', 'lms.lib.perfstats.views.end_profile'),) # 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.WECHAT_ENABLED: urlpatterns += ( url(r'^m/courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/courseware/(?P<chapter>[^/]*)/(?P<section>[^/]*)/(?P<position>[^/]*)/?$', 'wechat.views.mobi_index', name="courseware_unit"), url(r'^m/courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/courseware$','wechat.views.mobi_directory',name="mobi_info"),
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 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(app_name='course_wiki_do_not_reverse', namespace='course_wiki_do_not_reverse'))), ] COURSE_URLS = [ url( r'^look_up_registration_code$', instructor_registration_codes_views.look_up_registration_code, name='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 course_wiki import views as course_wiki_views 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(app_name='course_wiki_do_not_reverse', namespace='course_wiki_do_not_reverse'))), ] COURSE_URLS = [ url( r'^look_up_registration_code$', instructor_registration_codes_views.look_up_registration_code, name='look_up_registration_code',
urlpatterns += (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())), ) COURSE_URLS = patterns( '', url( r'^look_up_registration_code$', 'instructor.views.registration_codes.look_up_registration_code', name='look_up_registration_code',
if settings.PERFSTATS: urlpatterns += (url(r"^reprofile$", "perfstats.views.end_profile"),) # 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(
urlpatterns += (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_ID_PATTERN), 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"),
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from wiki.urls import get_pattern as wiki_pattern urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'', include(wiki_pattern())), )
settings.FAVICON_PATH) # pylint: disable=invalid-name 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),