Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(65)

Issue 4820042: Upload functionality added at item index page

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 5 months ago by sinha
Modified:
13 years, 5 months ago
Visibility:
Public.

Patch Set 1 #

Total comments: 6

Patch Set 2 : file upload template moved under forms and some other cleaning done #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -27 lines) Patch
M MoinMoin/apps/frontend/views.py View 3 chunks +4 lines, -4 lines 2 comments Download
M MoinMoin/static/js/jfu.js View 1 5 chunks +11 lines, -20 lines 1 comment Download
M MoinMoin/templates/forms.html View 1 1 chunk +27 lines, -0 lines 0 comments Download
M MoinMoin/templates/index.html View 1 3 chunks +12 lines, -1 line 0 comments Download
M MoinMoin/themes/modernized/static/css/common.css View 1 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 6
sinha
Please also see the diary page (http://moinmo.in/AkashSinha/Gsoc2011Diary/2011-07-22) for the view. http://codereview.appspot.com/4820042/diff/1/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4820042/diff/1/MoinMoin/apps/frontend/views.py#newcode463 ...
13 years, 5 months ago (2011-07-22 15:38:12 UTC) #1
Reimar Bauer
some comments http://codereview.appspot.com/4820042/diff/1/MoinMoin/static/js/jfu.js File MoinMoin/static/js/jfu.js (right): http://codereview.appspot.com/4820042/diff/1/MoinMoin/static/js/jfu.js#newcode281 MoinMoin/static/js/jfu.js:281: // No need to do at index ...
13 years, 5 months ago (2011-07-22 17:12:25 UTC) #2
Reimar Bauer
some comments
13 years, 5 months ago (2011-07-22 17:12:57 UTC) #3
Reimar Bauer
extended comment for recent uploads http://codereview.appspot.com/4820042/diff/1/MoinMoin/templates/index.html File MoinMoin/templates/index.html (right): http://codereview.appspot.com/4820042/diff/1/MoinMoin/templates/index.html#newcode62 MoinMoin/templates/index.html:62: <h2 style="display: none;">{{ _("More ...
13 years, 5 months ago (2011-07-22 17:21:54 UTC) #4
sinha
Code Modified. http://codereview.appspot.com/4820042/diff/7/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4820042/diff/7/MoinMoin/apps/frontend/views.py#newcode453 MoinMoin/apps/frontend/views.py:453: if request.method == 'GET': should i remove ...
13 years, 5 months ago (2011-07-23 22:06:41 UTC) #5
Reimar Bauer
13 years, 5 months ago (2011-07-24 08:11:14 UTC) #6
look at route decorator and change it their also to POST
If you don't set a method default is GET (http://flask.pocoo.org/docs/api/)

If we want that the jfu script only can be called with POST we should verify
that it can't be used by GET

http://codereview.appspot.com/4820042/diff/7/MoinMoin/apps/frontend/views.py
File MoinMoin/apps/frontend/views.py (right):

http://codereview.appspot.com/4820042/diff/7/MoinMoin/apps/frontend/views.py#...
MoinMoin/apps/frontend/views.py:453: if request.method == 'GET':
On 2011/07/23 22:06:42, sinha wrote:
> should i remove this complete GET response, as i have removed the get ajax
call
> from js file, if yes then what should i return on GET here(403 Error ?).
> 
> (OR we can leave this as it as, and may use it later at someplace).

Remove it, we still have it in the repository.

And change the @frontend.route so that it only is POST

Then you don't need an abort for GET

http://codereview.appspot.com/4820042/diff/7/MoinMoin/static/js/jfu.js
File MoinMoin/static/js/jfu.js (right):

http://codereview.appspot.com/4820042/diff/7/MoinMoin/static/js/jfu.js#newcode10
MoinMoin/static/js/jfu.js:10: */
Please make sure that the script only can be called with POST
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b