mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
cleaner api url definition
This commit is contained in:
parent
c4c43135f1
commit
2c9fc11349
@ -20,7 +20,7 @@ from build.urls import build_urls
|
||||
from order.urls import order_urls
|
||||
|
||||
from barcodes.api import barcode_api_urls
|
||||
from common.api import common_api_urls
|
||||
from common.api import common_api_urls, settings_api_urls
|
||||
from part.api import part_api_urls, bom_api_urls
|
||||
from company.api import company_api_urls
|
||||
from stock.api import stock_api_urls
|
||||
@ -52,7 +52,7 @@ admin.site.site_header = "InvenTree Admin"
|
||||
|
||||
apipatterns = [
|
||||
url(r'^barcode/', include(barcode_api_urls)),
|
||||
url(r'^settings/', include(common_api_urls)),
|
||||
url(r'^settings/', include(settings_api_urls)),
|
||||
url(r'^part/', include(part_api_urls)),
|
||||
url(r'^bom/', include(bom_api_urls)),
|
||||
url(r'^company/', include(company_api_urls)),
|
||||
@ -68,6 +68,9 @@ apipatterns = [
|
||||
# Plugin endpoints
|
||||
url(r'^action/', ActionPluginView.as_view(), name='api-action-plugin'),
|
||||
|
||||
# common endpoints
|
||||
url(r'', include(common_api_urls)),
|
||||
|
||||
# InvenTree information endpoint
|
||||
url(r'^$', InfoView.as_view(), name='api-inventree-info'),
|
||||
|
||||
|
@ -144,6 +144,7 @@ class NotificationList(generics.ListAPIView):
|
||||
#'age', # TODO enable ordering by age
|
||||
'category',
|
||||
'name',
|
||||
'read',
|
||||
]
|
||||
|
||||
search_fields = [
|
||||
@ -181,8 +182,7 @@ class NotificationDetail(generics.RetrieveDestroyAPIView):
|
||||
]
|
||||
|
||||
|
||||
common_api_urls = [
|
||||
|
||||
settings_api_urls = [
|
||||
# User settings
|
||||
url(r'^user/', include([
|
||||
# User Settings Detail
|
||||
@ -200,6 +200,9 @@ common_api_urls = [
|
||||
# Global Settings List
|
||||
url(r'^.*$', GlobalSettingsList.as_view(), name='api-global-setting-list'),
|
||||
])),
|
||||
]
|
||||
|
||||
common_api_urls = [
|
||||
|
||||
# Notifications
|
||||
url(r'^notifications/', include([
|
||||
|
Loading…
Reference in New Issue
Block a user