Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f4ba0c92
authored
Jul 10, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix store toplist refresh
parent
f1063e30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
circle/dashboard/views.py
+5
-4
No files found.
circle/dashboard/views.py
View file @
f4ba0c92
...
...
@@ -209,14 +209,15 @@ class IndexView(LoginRequiredMixin, TemplateView):
# toplist
user_home
=
"u-
%
d"
%
user
.
pk
cache_key
=
"toplist-
%
s"
%
user_home
cache
=
get_cache
(
"default"
)
toplist
=
cache
.
get
(
"toplist-
%
s"
%
user_home
)
toplist
=
cache
.
get
(
cache_key
)
if
not
toplist
:
try
:
toplist
=
store_api
.
process_list
(
store_api
.
toplist
(
user_home
))
except
Http404
:
toplist
=
[]
cache
.
set
(
"toplist-
%
s"
%
user_home
,
toplist
,
300
)
cache
.
set
(
cache_key
,
toplist
,
300
)
context
[
'toplist'
]
=
toplist
...
...
@@ -3190,12 +3191,12 @@ def store_new_directory(request):
@login_required
def
store_refresh_toplist
(
request
):
user_home
=
"u-
%
d"
%
request
.
user
.
pk
cache_key
=
"toplist-
%
s"
%
user_home
cache
=
get_cache
(
"default"
)
try
:
toplist
=
store_api
.
process_list
(
store_api
.
toplist
(
user_home
))
except
Http404
:
toplist
=
[]
cache
.
set
(
"toplist-test"
,
toplist
,
300
)
cache
.
set
(
cache_key
,
toplist
,
300
)
user_home
=
"u-
%
d"
%
request
.
user
.
pk
return
redirect
(
reverse
(
"dashboard.index"
))
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