Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dbchiro
dbchiroweb
Commits
a0ca53a6
Commit
a0ca53a6
authored
Apr 08, 2021
by
hypsug0
Browse files
feat: Caching autocomplet user API
parent
63331e81
Changes
1
Show whitespace changes
Inline
Side-by-side
accounts/urls.py
View file @
a0ca53a6
from
django.urls
import
path
from
django.urls
import
path
from
django.views.decorators.cache
import
cache_page
from
.api
import
ProfileAutocompleteSearch
from
.api
import
ProfileAutocompleteSearch
from
.views
import
(
from
.views
import
(
...
@@ -30,7 +31,11 @@ urlpatterns = [
...
@@ -30,7 +31,11 @@ urlpatterns = [
MyProfileDetailExport
.
as_view
(),
MyProfileDetailExport
.
as_view
(),
name
=
"myprofile_detail_export"
,
name
=
"myprofile_detail_export"
,
),
),
path
(
"api/v1/profile/search"
,
ProfileAutocompleteSearch
.
as_view
(),
name
=
"profile_search_api"
),
path
(
"api/v1/profile/search"
,
cache_page
(
60
*
15
)(
ProfileAutocompleteSearch
.
as_view
()),
name
=
"profile_search_api"
,
),
path
(
"myprofile/update"
,
MyProfileUpdate
.
as_view
(),
name
=
"myprofile_update"
),
path
(
"myprofile/update"
,
MyProfileUpdate
.
as_view
(),
name
=
"myprofile_update"
),
path
(
"list"
,
UserListView
.
as_view
(),
name
=
"user_search"
),
path
(
"list"
,
UserListView
.
as_view
(),
name
=
"user_search"
),
]
]
Write
Preview
Supports
Markdown
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