forked from angloc/wagtail-reacttaxonomy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
39 lines (30 loc) · 1.26 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from __future__ import absolute_import, unicode_literals
from django.conf import settings
from django.conf.urls import include
from django.urls import include, path, re_path
from django.contrib import admin
from django.http import HttpResponse
from django.views.static import serve
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocs_urls
from wagtail.contrib.sitemaps.views import sitemap
from api import api_router
urlpatterns = [
re_path(r'^django-admin/', admin.site.urls),
re_path(r'^admin/', include(wagtailadmin_urls)),
re_path(r'^documents/', include(wagtaildocs_urls)),
re_path(r'^api/v2/', api_router.urls),
re_path(r'', include(wagtail_urls)),
]
if settings.DEBUG:
import debug_toolbar
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# Serve static and media files from development server
urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# Django debug toolbar
urlpatterns = [
re_path(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns