Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7ff1c2fb
authored
Feb 13, 2013
by
Dányi Bence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
store: ajax toplist method added
parent
a66fb652
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
cloud/urls.py
+2
-0
store/views.py
+7
-0
No files found.
cloud/urls.py
View file @
7ff1c2fb
...
...
@@ -50,6 +50,8 @@ urlpatterns = patterns('',
url
(
r'^store/$'
,
'store.views.index'
,
name
=
'store_index'
),
url
(
r'^store/gui/$'
,
'store.views.gui'
,
name
=
'store_gui'
),
url
(
r'^store/top/$'
,
'store.views.toplist'
,
name
=
'store_top'
),
url
(
r'^ajax/store/top/$'
,
'store.views.ajax_toplist'
,
name
=
'axat_store_top'
),
url
(
r'^ajax/templateWizard$'
,
'one.views.ajax_template_wizard'
,
name
=
'ajax_template_wizard'
),
url
(
r'^ajax/share/(?P<id>\d+)/$'
,
'one.views.ajax_share_wizard'
,
...
...
store/views.py
View file @
7ff1c2fb
...
...
@@ -169,6 +169,13 @@ def toplist(request):
return
render_to_response
(
'store/list.html'
,
RequestContext
(
request
,
{
'file_list'
:
file_list
,
'path'
:
path
,
'backpath'
:
backpath
,
'username'
:
user
}))
@login_required
def
ajax_toplist
(
request
):
user
=
request
.
user
.
username
path
=
backpath
=
'/'
file_list
=
StoreApi
.
toplist
(
user
)
return
HttpResponse
(
json
.
dumps
(
file_list
))
@login_required
def
gui
(
request
):
user
=
request
.
user
.
username
if
request
.
method
==
'GET'
:
...
...
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