forked from shiyunbo/django-smartdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
71 lines (43 loc) · 1.81 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
from django.urls import path, re_path
from . import views
# namespace
app_name = 'smartdoc'
urlpatterns = [
# 展示产品列表
path('product/', views.ProductList.as_view(), name='product_list'),
# 展示产品详情
re_path(r'^product/(?P<pk>\d+)/$',
views.ProductDetail.as_view(), name='product_detail'),
# 创建产品
re_path(r'^product/create/$',
views.ProductCreate.as_view(), name='product_create'),
# 修改产品
re_path(r'^product/(?P<pk>\d+)/update/$',
views.ProductUpdate.as_view(), name='product_update'),
# 展示类别列表
path('category/', views.CategoryList.as_view(), name='category_list'),
# 展示类别详情
re_path(r'^category/(?P<pk>\d+)/$',
views.CategoryDetail.as_view(), name='category_detail'),
# 创建类别
re_path(r'^category/create/$',
views.CategoryCreate.as_view(), name='category_create'),
# 修改类别
re_path(r'^category/(?P<pk>\d+)/update/$',
views.CategoryUpdate.as_view(), name='category_update'),
# 展示文档列表
path('document/', views.DocumentList.as_view(), name='document_list'),
# 展示文档详情
re_path(r'^product/(?P<pkr>\d+)/document/(?P<pk>\d+)/$',
views.DocumentDetail.as_view(), name='document_detail'),
# 创建文档
re_path(r'^product/(?P<pk>\d+)/document/create/$',
views.DocumentCreate.as_view(), name='document_create'),
# 修改文档
re_path(r'^product/(?P<pkr>\d+)/document/(?P<pk>\d+)/update/$',
views.DocumentUpdate.as_view(), name='document_update'),
# 文档搜索
path('document/search/', views.document_search, name='document_search'),
# Ajax搜索
path('ajax/search/', views.doc_ajax_search, name='doc_ajax_search'),
]