changeset 270:2c12608c7c38

fix url generation for jquery-file-upload, use download instead of get for DL link
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 03 Jul 2011 00:58:13 +0200
parents b7fda720496b
children 8a21b92d8985
files MoinMoin/apps/frontend/views.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sun Jul 03 00:12:23 2011 +0200
+++ b/MoinMoin/apps/frontend/views.py	Sun Jul 03 00:58:13 2011 +0200
@@ -469,8 +469,8 @@
             abort(403)
         files = []
         for full_name, rel_name, mimetype in item.flat_index():
-            url = url_for('show_item', item_name=full_name)
-            url_download = url_for('get_item', item_name=full_name)
+            url = url_for('.show_item', item_name=full_name)
+            url_download = url_for('.download_item', item_name=full_name)
             files.append(dict(name=rel_name, url=url, url_download=url_download, size=0))
         return jsonify(files=files)
     if request.method == 'POST':
@@ -484,8 +484,8 @@
                                item_name=item_name)
             return jsonify(name=subitem_name,
                            size=size,
-                           url=url_for('show_item', item_name=item_name, rev=revno),
-                           url_download=url_for('get_item', item_name=item_name, rev=revno),
+                           url=url_for('.show_item', item_name=item_name, rev=revno),
+                           url_download=url_for('.download_item', item_name=item_name, rev=revno),
                           )
         except AccessDeniedError:
             abort(403)