summaryrefslogtreecommitdiff
path: root/config/base_urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'config/base_urls.py')
-rw-r--r--config/base_urls.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/config/base_urls.py b/config/base_urls.py
new file mode 100644
index 0000000..ed7da2d
--- /dev/null
+++ b/config/base_urls.py
@@ -0,0 +1,35 @@
+from django.urls import path, re_path, include
+from django.contrib import admin
+from django.conf.urls.static import static
+from django.conf import settings
+from django.contrib.sitemaps.views import sitemap
+
+from pages.views import PageDetailView, HomePageDetailView
+#import builder.views
+import utils.views
+import builder.views
+
+
+admin.autodiscover()
+
+urlpatterns = [
+ re_path(r'^admin/build/.*', builder.views.do_build),
+ path(r'admin/data/', include('utils.urls')),
+ path(r'admin/', admin.site.urls),
+ #path(r'luximages/insert/', utils.views.insert_image),
+ #path(r'sitemap.xml', sitemap, {'sitemaps': sitemaps}),
+ path(r'<slug>', PageDetailView.as_view()),
+ path(r'<path>/<slug>/', PageDetailView.as_view()),
+ path(r'', HomePageDetailView.as_view()),
+] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
+
+
+if settings.DEBUG:
+ import debug_toolbar
+ urlpatterns = [
+ path('__debug__/', include(debug_toolbar.urls)),
+
+ # For django versions before 2.0:
+ # url(r'^__debug__/', include(debug_toolbar.urls)),
+
+ ] + urlpatterns