Commit 90c629c8 authored by ibuler's avatar ibuler

[Update] 修改url

parent c9d192ee
...@@ -30,7 +30,6 @@ schema_view = get_schema_view( ...@@ -30,7 +30,6 @@ schema_view = get_schema_view(
) )
api_url_pattern = re.compile(r'^/api/(?P<version>\w+)/(?P<app>\w+)/(?P<extra>.*)$') api_url_pattern = re.compile(r'^/api/(?P<version>\w+)/(?P<app>\w+)/(?P<extra>.*)$')
class HttpResponseTemporaryRedirect(HttpResponse): class HttpResponseTemporaryRedirect(HttpResponse):
status_code = 307 status_code = 307
...@@ -75,9 +74,8 @@ app_view_patterns = [ ...@@ -75,9 +74,8 @@ app_view_patterns = [
path('orgs/', include('orgs.urls.views_urls', namespace='orgs')), path('orgs/', include('orgs.urls.views_urls', namespace='orgs')),
] ]
XPACK_DIR = os.path.join(settings.BASE_DIR, 'xpack') if settings.XPACK_ENABLED:
if os.path.isdir(XPACK_DIR): app_view_patterns.append(path('xpack/', include('xpack.urls.views_urls', namespace='xpack')))
app_view_patterns.append(path('xpack/', include('xpack.urls', namespace='xpack')))
urlpatterns = [ urlpatterns = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment