django-simplecms/cms/urls.py

16 wiersze
790 B
Python
Czysty Zwykły widok Historia

2019-03-27 15:49:14 +00:00
from django.urls import path
2019-08-23 15:19:40 +00:00
from .views import PageView, UpdatePage, CreatePage, UpdateSection, CreateSection, CreateSubSection
2019-03-27 15:49:14 +00:00
app_name = 'cms'
urlpatterns = [
path('', PageView.as_view(), {'slug': ''}, name='homepage'),
path('<slug:slug>/', PageView.as_view(), name='page'),
path('cms/homepage/', UpdatePage.as_view(), {'slug': ''}, name='updatehomepage'),
2019-08-23 15:19:40 +00:00
path('cms/page/<int:pk>/', UpdatePage.as_view(), name='updatepage'),
path('cms/section/<int:pk>/', UpdateSection.as_view(), name='updatesection'),
2019-03-27 15:49:14 +00:00
path('cms/newpage/', CreatePage.as_view(), name='createpage'),
2019-08-23 15:19:40 +00:00
path('cms/page/<int:pk>/newsection/', CreateSection.as_view(), name='createsection'),
path('cms/section/<int:pk>/newsubsection/', CreateSubSection.as_view(), name='createsubsection'),
2019-03-27 15:49:14 +00:00
]