(r'^admin/', include(admin.site.urls)), url(r'^_impersonate/', include('impersonate.urls')), (r'^stats/$', TemplateView.as_view(template_name="stats.html")), (r'smoketest/', include('smoketest.urls')), (r'infranil/', include('infranil.urls')), (r'^uploads/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^pagetree/', include('pagetree.urls')), (r'^quizblock/', include('quizblock.urls')), (r'^pages/edit/(?P<path>.*)$', login_required(EditView.as_view( hierarchy_name="main", hierarchy_base="/pages/")), {}, 'edit-page'), (r'^pages/instructor/(?P<path>.*)$', login_required(InstructorView.as_view( hierarchy_name="main", hierarchy_base="/pages/"))), (r'^pages/(?P<path>.*)$', PageView.as_view( hierarchy_name="main", hierarchy_base="/pages/")), url(r'^wagtail/admin/', include(wagtailadmin_urls)), url(r'^wagtail/documents/', include(wagtaildocs_urls)), url(r'search/$', views.search, name='search'), # For anything not caught by a more specific rule above, hand over to # Wagtail's serving mechanism url(r'^wagtail/', include(wagtail_urls)), )
from django.conf.urls import patterns, include from pagetree.generic.views import EditView, InstructorView, PageView urlpatterns = patterns( '', (r'^pagetree/', include('pagetree.urls')), # instantiate generic views using a template that doesn't # extend/depend on base.html (r'^pages/edit/(?P<path>.*)$', EditView.as_view(template_name="pagetree/test_page.html"), {}, 'edit-page'), (r'^pages/instructor/(?P<path>.*)$', InstructorView.as_view(template_name="pagetree/test_page.html")), (r'^pages/(?P<path>.*)$', PageView.as_view(template_name="pagetree/test_page.html")), # a second set to make sure non-default hierarchies # get handled as well (r'^pages2/edit/(?P<path>.*)$', EditView.as_view( hierarchy_name="two", hierarchy_base="/pages2", template_name="pagetree/test_page.html"), {}, 'edit-page'), (r'^pages2/instructor/(?P<path>.*)$', InstructorView.as_view( hierarchy_name="two", hierarchy_base="/pages2", template_name="pagetree/test_page.html")), (r'^pages2/(?P<path>.*)$',
url(r'^registration/', include('registration.backends.default.urls')), url(r'^$', views.IndexView.as_view()), url(r'^admin/', include(admin.site.urls)), url(r'^_impersonate/', include('impersonate.urls')), url(r'^stats/$', TemplateView.as_view(template_name="stats.html")), url(r'smoketest/', include('smoketest.urls')), url(r'infranil/', include('infranil.urls')), url(r'^uploads/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}), url(r'^pagetree/', include('pagetree.urls')), url(r'^quizblock/', include('quizblock.urls')), url( r'^pages/edit/(?P<path>.*)$', login_required( EditView.as_view(hierarchy_name="main", hierarchy_base="/pages/")), {}, 'edit-page'), url( r'^pages/instructor/(?P<path>.*)$', login_required( InstructorView.as_view(hierarchy_name="main", hierarchy_base="/pages/"))), url(r'^pages/(?P<path>.*)$', PageView.as_view(hierarchy_name="main", hierarchy_base="/pages/")), ] if settings.DEBUG: import debug_toolbar urlpatterns += [ url(r'^__debug__/', include(debug_toolbar.urls)), ]
from __future__ import unicode_literals from django.conf.urls import include, url from pagetree.generic.views import EditView, InstructorView, PageView urlpatterns = [ url(r'^pagetree/', include('pagetree.urls')), # instantiate generic views using a template that doesn't # extend/depend on base.html url(r'^pages/edit/(?P<path>.*)$', EditView.as_view(template_name="pagetree/test_page.html"), {}, 'edit-page'), url(r'^pages/instructor/(?P<path>.*)$', InstructorView.as_view(template_name="pagetree/test_page.html")), url(r'^pages/(?P<path>.*)$', PageView.as_view(template_name="pagetree/test_page.html")), # a second set to make sure non-default hierarchies # get handled as well url( r'^pages2/edit/(?P<path>.*)$', EditView.as_view(hierarchy_name="two", hierarchy_base="/pages2", template_name="pagetree/test_page.html"), {}, 'edit-page'), url( r'^pages2/instructor/(?P<path>.*)$', InstructorView.as_view(hierarchy_name="two", hierarchy_base="/pages2", template_name="pagetree/test_page.html")),