diff MoinMoin/items/__init__.py @ 316:4ee796d759bf

use url_for_item where appropriate (in py code, no template changes yet) make url_for_item available for templates
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 05 Aug 2011 14:01:21 +0200
parents fed6024028b4
children ab4ac448d5d8 201758d56fb1
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Fri Aug 05 13:25:12 2011 +0200
+++ b/MoinMoin/items/__init__.py	Fri Aug 05 14:01:21 2011 +0200
@@ -61,6 +61,7 @@
 from MoinMoin.themes import render_template
 from MoinMoin import wikiutil, config, user
 from MoinMoin.util.send_file import send_file
+from MoinMoin.util.interwiki import url_for_item
 from MoinMoin.storage.error import NoSuchItemError, NoSuchRevisionError, AccessDeniedError, \
                                    StorageError
 from MoinMoin.config import UUID, NAME, NAME_OLD, MTIME, REVERTED_TO, ACL, \
@@ -709,7 +710,7 @@
                 except AccessDeniedError:
                     abort(403)
                 else:
-                    return redirect(url_for('frontend.show_item', item_name=self.name))
+                    return redirect(url_for_item(self.name))
         return render_template(self.template,
                                item_name=self.name,
                                rows_meta=str(ROWS_META), cols=str(COLS),
@@ -1170,7 +1171,7 @@
                 except AccessDeniedError:
                     abort(403)
                 else:
-                    return redirect(url_for('frontend.show_item', item_name=self.name))
+                    return redirect(url_for_item(self.name))
         return render_template(self.template,
                                item_name=self.name,
                                rows_data=str(ROWS_DATA), rows_meta=str(ROWS_META), cols=str(COLS),