mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
make url simpler
This commit is contained in:
parent
8e425e67a1
commit
c703f9993f
@ -1541,7 +1541,7 @@ part_api_urls = [
|
||||
|
||||
# Base URL for PartCategory API endpoints
|
||||
url(r'^category/', include([
|
||||
url(r'^tree/(?P<slug>[-\w]+)/', CategoryTree.as_view(), name='api-part-category-tree'),
|
||||
url(r'^tree/', CategoryTree.as_view(), name='api-part-category-tree'),
|
||||
url(r'^parameters/', CategoryParameterList.as_view(), name='api-part-category-parameter-list'),
|
||||
|
||||
url(r'^(?P<pk>\d+)/?', CategoryDetail.as_view(), name='api-part-category-detail'),
|
||||
|
@ -152,7 +152,7 @@ function enableSidebar(label, options={}) {
|
||||
$('#tree').jstree({
|
||||
'core' : {
|
||||
'data' : {
|
||||
'url' : '/api/part/category/tree/root/',
|
||||
'url' : '/api/part/category/tree/',
|
||||
'data' : function (node) { return { 'id' : node.id }; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user