Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
400d7449
Commit
400d7449
authored
Aug 23, 2016
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add api redirect
parent
7cebc4ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
urls.py
apps/jumpserver/urls.py
+9
-0
No files found.
apps/jumpserver/urls.py
View file @
400d7449
...
...
@@ -17,12 +17,21 @@ from django.conf.urls import url, include
from
django.conf
import
settings
from
django.conf.urls.static
import
static
from
django.views.generic.base
import
TemplateView
from
django.http
import
HttpResponseRedirect
def
view
(
request
,
**
kwargs
):
if
kwargs
:
print
kwargs
return
HttpResponseRedirect
(
'/'
+
kwargs
[
"module"
]
+
'/'
+
kwargs
[
"version"
]
+
'/'
+
kwargs
[
"api"
])
urlpatterns
=
[
url
(
r'^$'
,
TemplateView
.
as_view
(
template_name
=
'base.html'
)),
url
(
r'^users/'
,
include
(
'users.urls'
)),
url
(
r'^assets/'
,
include
(
'assets.urls'
)),
url
(
r'^terminal/'
,
include
(
'webterminal.urls'
)),
url
(
r'^api/(?P<version>.*)/(?P<module>.*)/(?P<api>.*)'
,
view
),
# url(r'^admin/', admin.site.urls),
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment