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
40
41
42
43
44
45
46
47
48
49
50
|
from django.urls import path, re_path, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.sitemaps.views import sitemap
from django.views.generic.base import RedirectView
from pages.views import PageDetailView, PageDetailTXTView, HomePageList
from posts.models import PostSitemap
from pages.models import PageSitemap
import builder.views
import utils.views
#import products.views
from posts.views import PostRSSFeedView
admin.autodiscover()
admin.site.enable_nav_sidebar = False
sitemaps = {
'posts': PostSitemap,
'pages': PageSitemap,
}
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('contact/', include('contact.urls')),
path(r'newsletter/', include('lttr.urls')),
path(r'feed.xml', PostRSSFeedView(),name="feed"),
path(r'sitemap.xml', sitemap, {'sitemaps': sitemaps}),
path(r'classes/', include('classes.urls')),
path(r'<slug>.txt', PageDetailTXTView.as_view()),
path(r'<slug>', include('pages.urls', namespace='pages')),
path(r'<path>/<slug>/', PageDetailView.as_view()),
path(r'', HomePageList.as_view(), {'pk':1,}, name="homepage"),
] + 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
|