labelbase/django/knowledge_base/urls.py
Xavier Fiechter 1bed579312 .
2024-03-21 11:34:17 +01:00

13 lines
619 B
Python

from django.urls import path
from .views import ExportJSONView, ImportJSONView
from .views import CategoryDetailView, ArticleDetailView, IndexView
from .decorators import staff_required
urlpatterns = [
path('', IndexView.as_view(), name='kb-index'),
path('category/<slug:slug>/', CategoryDetailView.as_view(), name='category_detail'),
path('article/<slug:slug>/', ArticleDetailView.as_view(), name='article_detail'),
#TODO: staff only,
path('export', staff_required(ExportJSONView.as_view()), name='export_json'),
path('import', staff_required(ImportJSONView.as_view()), name='import_json'),
]