Prepend /api/ to API URL

This commit is contained in:
Oliver Walters 2017-04-14 21:59:52 +10:00
parent 858a7fe089
commit 2c628c8ab4

View File

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