make url simpler

This commit is contained in:
Matthias 2021-12-06 22:37:42 +01:00
parent 8e425e67a1
commit c703f9993f
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 2 additions and 2 deletions

View File

@ -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'),

View File

@ -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 }; }
}
}