From 2c628c8ab40111fc8fe6216a1dc6986d84dd5b02 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 14 Apr 2017 21:59:52 +1000 Subject: [PATCH] Prepend /api/ to API URL --- InvenTree/InvenTree/urls.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index d750b6388c..7b94439c97 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -16,15 +16,21 @@ def Inventree404(self): return Response(content, status=status.HTTP_404_NOT_FOUND) -urlpatterns = [ +apipatterns = [ url(r'^stock/', include('stock.urls')), url(r'^part/', include('part.urls')), url(r'^supplier/', include('supplier.urls')), url(r'^track/', include('track.urls')), url(r'^project/', include('project.urls')), - url(r'^admin/', admin.site.urls), - url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')), # Any other URL url(r'', Inventree404) ] + +urlpatterns = [ + # API URL + url(r'^api/', include(apipatterns)), + + url(r'^admin/', admin.site.urls), + url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')), +]