Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
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
rank
search_tips
Commits
f61b0d62
Commit
f61b0d62
authored
Jan 21, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify view
parent
9da76fe0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
views.py
search/views.py
+1
-1
urls.py
search_tips/urls.py
+1
-0
No files found.
search/views.py
View file @
f61b0d62
...
@@ -24,7 +24,7 @@ def auto_complete(request):
...
@@ -24,7 +24,7 @@ def auto_complete(request):
Return:
Return:
{'error': 0|1, 'data': [word, word, word],}
{'error': 0|1, 'data': [word, word, word],}
"""
"""
logging
.
info
(
"duan add,q is:
%
s"
%
str
(
q
)
.
encode
(
"utf-8"
))
logging
.
info
(
"duan add,q is:
%
s"
%
str
(
q
)
.
encode
(
"utf-8"
))
q
=
request
.
GET
.
get
(
'q'
,
''
)
.
strip
()
q
=
request
.
GET
.
get
(
'q'
,
''
)
.
strip
()
logging
.
info
(
"duan add,q is:
%
s"
%
str
(
q
)
.
encode
(
"utf-8"
))
logging
.
info
(
"duan add,q is:
%
s"
%
str
(
q
)
.
encode
(
"utf-8"
))
...
...
search_tips/urls.py
View file @
f61b0d62
...
@@ -21,6 +21,7 @@ from search.views import auto_complete
...
@@ -21,6 +21,7 @@ from search.views import auto_complete
urlpatterns
=
[
urlpatterns
=
[
''
,
url
(
r'^admin/'
,
admin
.
site
.
urls
),
url
(
r'^admin/'
,
admin
.
site
.
urls
),
url
(
r'^search/auto_complete/$'
,
auto_complete
),
url
(
r'^search/auto_complete/$'
,
auto_complete
),
]
]
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