changeset 266:7a6b116afa20

upgrade to flask 0.7.1 (not compatible to older flasks) to upgrade to flask 0.7.1 you need to activate your virtual env and run: pip install --upgrade flask what I had to do for upgrading moin src to flask 0.7.1: ran the flask upgrade script, review what it did added template_folder='templates' to BluePrint initializers where needed moved templates to a subdirectory having the shortname of the BluePrint require flask >=0.7.1 in setup.py
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 02 Jul 2011 20:18:34 +0200
parents 7a81ff51008a
children e969c9318772
files MoinMoin/app.py MoinMoin/apps/admin/__init__.py MoinMoin/apps/admin/templates/admin/highlighterhelp.html MoinMoin/apps/admin/templates/admin/index.html MoinMoin/apps/admin/templates/admin/interwikihelp.html MoinMoin/apps/admin/templates/admin/itemsize.html MoinMoin/apps/admin/templates/admin/sysitems_upgrade.html MoinMoin/apps/admin/templates/admin/userbrowser.html MoinMoin/apps/admin/templates/admin/wikiconfig.html MoinMoin/apps/admin/templates/admin/wikiconfighelp.html MoinMoin/apps/admin/templates/highlighterhelp.html MoinMoin/apps/admin/templates/index.html MoinMoin/apps/admin/templates/interwikihelp.html MoinMoin/apps/admin/templates/itemsize.html MoinMoin/apps/admin/templates/sysitems_upgrade.html MoinMoin/apps/admin/templates/userbrowser.html MoinMoin/apps/admin/templates/wikiconfig.html MoinMoin/apps/admin/templates/wikiconfighelp.html MoinMoin/apps/admin/views.py MoinMoin/apps/feed/__init__.py MoinMoin/apps/frontend/__init__.py MoinMoin/apps/frontend/views.py MoinMoin/apps/misc/__init__.py MoinMoin/apps/misc/templates/misc/sitemap.xml MoinMoin/apps/misc/templates/misc/urls_names.txt MoinMoin/apps/misc/templates/sitemap.xml MoinMoin/apps/misc/templates/urls_names.txt MoinMoin/apps/serve/__init__.py MoinMoin/templates/base.html MoinMoin/templates/global_index.html MoinMoin/templates/index.html MoinMoin/templates/index2.html MoinMoin/templates/snippets.html setup.py
diffstat 34 files changed, 220 insertions(+), 220 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/app.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/app.py	Sat Jul 02 20:18:34 2011 +0200
@@ -103,21 +103,21 @@
     from MoinMoin.apps.frontend import frontend
     frontend.before_request(before_wiki)
     frontend.after_request(after_wiki)
-    app.register_module(frontend)
+    app.register_blueprint(frontend)
     from MoinMoin.apps.admin import admin
     admin.before_request(before_wiki)
     admin.after_request(after_wiki)
-    app.register_module(admin, url_prefix='/+admin')
+    app.register_blueprint(admin, url_prefix='/+admin')
     from MoinMoin.apps.feed import feed
     feed.before_request(before_wiki)
     feed.after_request(after_wiki)
-    app.register_module(feed, url_prefix='/+feed')
+    app.register_blueprint(feed, url_prefix='/+feed')
     from MoinMoin.apps.misc import misc
     misc.before_request(before_wiki)
     misc.after_request(after_wiki)
-    app.register_module(misc, url_prefix='/+misc')
+    app.register_blueprint(misc, url_prefix='/+misc')
     from MoinMoin.apps.serve import serve
-    app.register_module(serve, url_prefix='/+serve')
+    app.register_blueprint(serve, url_prefix='/+serve')
     clock.stop('create_app register')
     clock.start('create_app flask-cache')
     cache = Cache()
@@ -146,7 +146,7 @@
             FileSystemLoader(app.cfg.template_dirs),
             app.jinja_env.loader,
         ])
-    app.error_handlers[403] = themed_error
+    app.register_error_handler(403, themed_error)
     clock.stop('create_app flask-themes')
     clock.stop('create_app total')
     del clock
--- a/MoinMoin/apps/admin/__init__.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/apps/admin/__init__.py	Sat Jul 02 20:18:34 2011 +0200
@@ -8,7 +8,7 @@
 """
 
 
-from flask import Module
-admin = Module(__name__)
+from flask import Blueprint
+admin = Blueprint('admin', __name__, template_folder='templates')
 import MoinMoin.apps.admin.views
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/admin/highlighterhelp.html	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,7 @@
+{% import "utils.html" as utils %}
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("Available Highlighters") }}</h1>
+{{ utils.table(headings, rows) }}
+{% endblock %}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/admin/index.html	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,23 @@
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("Documentation") }}</h1>
+<ul>
+    <li><a href="{{ url_for('serve.files', name='docs', filename='index.html') }}">{{ _("Documentation (local)") }}</a></li>
+</ul>
+<h1>{{ _("Admin Menu") }}</h1>
+<ul>
+    <li><a href="{{ url_for('admin.userbrowser') }}">{{ _("User Browser") }}</a></li>
+    <li><a href="{{ url_for('admin.sysitems_upgrade') }}">{{ _("Upgrade system items") }}</a></li>
+    <li><a href="{{ url_for('admin.wikiconfig') }}">{{ _("Show Wiki Configuration") }}</a></li>
+    <li><a href="{{ url_for('admin.wikiconfighelp') }}">{{ _("Show Wiki Configuration Help") }}</a></li>
+</ul>
+<h1>{{ _("User Menu") }}</h1>
+<ul>
+    <li><a href="{{ url_for('frontend.wanted_items') }}">{{ _("Wanted Items") }}</a></li>
+    <li><a href="{{ url_for('frontend.orphaned_items') }}">{{ _("Orphaned Items") }}</a></li>
+    <li><a href="{{ url_for('admin.itemsize') }}">{{ _("Item sizes (latest revision)") }}</a></li>
+    <li><a href="{{ url_for('admin.interwikihelp') }}">{{ _("Known InterWiki names") }}</a></li>
+    <li><a href="{{ url_for('admin.highlighterhelp') }}">{{ _("Available Highlighters") }}</a></li>
+</ul>
+{% endblock %}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/admin/interwikihelp.html	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,7 @@
+{% import "utils.html" as utils %}
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("Known InterWiki names") }}</h1>
+{{ utils.table(headings, rows) }}
+{% endblock %}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/admin/itemsize.html	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,7 @@
+{% import "utils.html" as utils %}
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("Item sizes (latest revision)") }}</h1>
+{{ utils.table(headings, rows) }}
+{% endblock %}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/admin/sysitems_upgrade.html	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,14 @@
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("System items upgrade") }}</h1>
+<p>
+{{ _("You can upgrade your system items by uploading an xml file with new items below.") }}
+</p>
+<form action="{{ url_for('admin.sysitems_upgrade') }}" method="POST" enctype="multipart/form-data">
+<fieldset>
+    <label for="xmlfile">System items XML file:</label><input type="file" id="xmlfile" name="xmlfile" />
+    <input type="submit" name="submit" value="{{ _("Upgrade system items") }}" />
+</fieldset>
+</form>
+{% endblock %}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/admin/userbrowser.html	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,35 @@
+{% extends theme("layout.html") %}
+{% block content %}
+    <table>
+    <tr>
+        <th>{{ _("User name") }}</th>
+        <th>{{ _("Member of Groups") }}</th>
+        <th>{{ _("Email address") }}</th>
+        <th>{{ _("Actions") }}</th>
+    </tr>
+    {% for u in user_accounts %}
+    <tr>
+        <td><a href="{{ url_for('frontend.show_item', item_name=u.name) }}">{{ u.name }}</a>{{ u.disabled and " (%s)" % _("disabled") or ""}}</td>
+        <td>{{ u.groups|join(',') }}</td>
+        <td>
+            {% if u.email %}
+            <a href="mailto:{{ u.email|e }}" class="mailto">{{ u.email|e }}</a>
+            {% endif %}
+        </td>
+        <td>
+            <form action="{{ url_for('admin.userprofile', user_name=u.name) }}" method="GET">
+                <input type="hidden" name="key" value="disabled" />
+                <input type="hidden" name="val" value="{{ u.disabled and "0" or "1" }}" />
+                <input type="submit" name="userprofile" value="{{ u.disabled and _("Enable user") or _("Disable user") }}" />
+            </form>
+            <form action="{{ url_for('admin.mail_recovery_token') }}" method="GET">
+                <input type="hidden" name="email" value="{{ u.email }}" />
+                <input type="hidden" name="account_sendmail" value="1" />
+                <input type="submit" name="recoverpass" value="{{ _("Mail account data") }}" />
+            </form>
+        </td>
+    </tr>
+    {% endfor %}
+</table>
+{% endblock %}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/admin/wikiconfig.html	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,36 @@
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("Wiki configuration") }}</h1>
+<p>
+{{ _("This table shows all settings in this wiki that do not have default values. "
+     "Settings that the configuration system doesn't know about are shown in italic, "
+     "those may be due to third-party extensions needing configuration or settings that "
+     "were removed from Moin.")
+}}
+</p>
+<table>
+<thead>
+<tr>
+<td><strong>{{ _('Variable name') }}</strong></td>
+<td><strong>{{ _('Setting') }}</strong></td>
+</tr>
+</thead>
+<tbody>
+{% for name, value in found %}
+<tr>
+<td>
+    {% if name in settings %}
+        {{ name }}
+    {% else %}
+        <em>{{ name }}</em>
+    {% endif %}
+</td>
+<td>
+    <code>{{ "%r" % (value, ) }}</code>
+</td>
+</tr>
+{% endfor %}
+</tdbody>
+</table>
+{% endblock %}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/admin/wikiconfighelp.html	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,29 @@
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("WikiConfig Help") }}</h1>
+{% for heading, desc, opts in groups %}
+    <h2>{{ heading }}</h2>
+    {% if desc %}
+        <p>{{ desc }}</p>
+    {% endif %}
+    <table>
+    <thead>
+    <tr>
+        <td><strong>{{ _('Variable name') }}</strong></td>
+        <td><strong>{{ _('Default') }}</strong></td>
+        <td><strong>{{ _('Description') }}</strong></td>
+    </tr>
+    </thead>
+    <tbody>
+    {% for name, default, description in opts %}
+        <tr>
+            <td>{{ name }}</td>
+            <td><code>{{ default }}</code></td>
+            <td>{{ description }}</td>
+        </tr>
+    {% endfor %}
+    </tbody>
+    </table>
+{% endfor %}
+{% endblock %}
+
--- a/MoinMoin/apps/admin/templates/highlighterhelp.html	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-{% import "utils.html" as utils %}
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("Available Highlighters") }}</h1>
-{{ utils.table(headings, rows) }}
-{% endblock %}
-
--- a/MoinMoin/apps/admin/templates/index.html	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("Documentation") }}</h1>
-<ul>
-    <li><a href="{{ url_for('serve.files', name='docs', filename='index.html') }}">{{ _("Documentation (local)") }}</a></li>
-</ul>
-<h1>{{ _("Admin Menu") }}</h1>
-<ul>
-    <li><a href="{{ url_for('admin.userbrowser') }}">{{ _("User Browser") }}</a></li>
-    <li><a href="{{ url_for('admin.sysitems_upgrade') }}">{{ _("Upgrade system items") }}</a></li>
-    <li><a href="{{ url_for('admin.wikiconfig') }}">{{ _("Show Wiki Configuration") }}</a></li>
-    <li><a href="{{ url_for('admin.wikiconfighelp') }}">{{ _("Show Wiki Configuration Help") }}</a></li>
-</ul>
-<h1>{{ _("User Menu") }}</h1>
-<ul>
-    <li><a href="{{ url_for('frontend.wanted_items') }}">{{ _("Wanted Items") }}</a></li>
-    <li><a href="{{ url_for('frontend.orphaned_items') }}">{{ _("Orphaned Items") }}</a></li>
-    <li><a href="{{ url_for('admin.itemsize') }}">{{ _("Item sizes (latest revision)") }}</a></li>
-    <li><a href="{{ url_for('admin.interwikihelp') }}">{{ _("Known InterWiki names") }}</a></li>
-    <li><a href="{{ url_for('admin.highlighterhelp') }}">{{ _("Available Highlighters") }}</a></li>
-</ul>
-{% endblock %}
-
--- a/MoinMoin/apps/admin/templates/interwikihelp.html	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-{% import "utils.html" as utils %}
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("Known InterWiki names") }}</h1>
-{{ utils.table(headings, rows) }}
-{% endblock %}
-
--- a/MoinMoin/apps/admin/templates/itemsize.html	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-{% import "utils.html" as utils %}
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("Item sizes (latest revision)") }}</h1>
-{{ utils.table(headings, rows) }}
-{% endblock %}
-
--- a/MoinMoin/apps/admin/templates/sysitems_upgrade.html	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("System items upgrade") }}</h1>
-<p>
-{{ _("You can upgrade your system items by uploading an xml file with new items below.") }}
-</p>
-<form action="{{ url_for('admin.sysitems_upgrade') }}" method="POST" enctype="multipart/form-data">
-<fieldset>
-    <label for="xmlfile">System items XML file:</label><input type="file" id="xmlfile" name="xmlfile" />
-    <input type="submit" name="submit" value="{{ _("Upgrade system items") }}" />
-</fieldset>
-</form>
-{% endblock %}
-
--- a/MoinMoin/apps/admin/templates/userbrowser.html	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-{% extends theme("layout.html") %}
-{% block content %}
-    <table>
-    <tr>
-        <th>{{ _("User name") }}</th>
-        <th>{{ _("Member of Groups") }}</th>
-        <th>{{ _("Email address") }}</th>
-        <th>{{ _("Actions") }}</th>
-    </tr>
-    {% for u in user_accounts %}
-    <tr>
-        <td><a href="{{ url_for('frontend.show_item', item_name=u.name) }}">{{ u.name }}</a>{{ u.disabled and " (%s)" % _("disabled") or ""}}</td>
-        <td>{{ u.groups|join(',') }}</td>
-        <td>
-            {% if u.email %}
-            <a href="mailto:{{ u.email|e }}" class="mailto">{{ u.email|e }}</a>
-            {% endif %}
-        </td>
-        <td>
-            <form action="{{ url_for('admin.userprofile', user_name=u.name) }}" method="GET">
-                <input type="hidden" name="key" value="disabled" />
-                <input type="hidden" name="val" value="{{ u.disabled and "0" or "1" }}" />
-                <input type="submit" name="userprofile" value="{{ u.disabled and _("Enable user") or _("Disable user") }}" />
-            </form>
-            <form action="{{ url_for('admin.mail_recovery_token') }}" method="GET">
-                <input type="hidden" name="email" value="{{ u.email }}" />
-                <input type="hidden" name="account_sendmail" value="1" />
-                <input type="submit" name="recoverpass" value="{{ _("Mail account data") }}" />
-            </form>
-        </td>
-    </tr>
-    {% endfor %}
-</table>
-{% endblock %}
-
--- a/MoinMoin/apps/admin/templates/wikiconfig.html	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("Wiki configuration") }}</h1>
-<p>
-{{ _("This table shows all settings in this wiki that do not have default values. "
-     "Settings that the configuration system doesn't know about are shown in italic, "
-     "those may be due to third-party extensions needing configuration or settings that "
-     "were removed from Moin.")
-}}
-</p>
-<table>
-<thead>
-<tr>
-<td><strong>{{ _('Variable name') }}</strong></td>
-<td><strong>{{ _('Setting') }}</strong></td>
-</tr>
-</thead>
-<tbody>
-{% for name, value in found %}
-<tr>
-<td>
-    {% if name in settings %}
-        {{ name }}
-    {% else %}
-        <em>{{ name }}</em>
-    {% endif %}
-</td>
-<td>
-    <code>{{ "%r" % (value, ) }}</code>
-</td>
-</tr>
-{% endfor %}
-</tdbody>
-</table>
-{% endblock %}
-
--- a/MoinMoin/apps/admin/templates/wikiconfighelp.html	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("WikiConfig Help") }}</h1>
-{% for heading, desc, opts in groups %}
-    <h2>{{ heading }}</h2>
-    {% if desc %}
-        <p>{{ desc }}</p>
-    {% endif %}
-    <table>
-    <thead>
-    <tr>
-        <td><strong>{{ _('Variable name') }}</strong></td>
-        <td><strong>{{ _('Default') }}</strong></td>
-        <td><strong>{{ _('Description') }}</strong></td>
-    </tr>
-    </thead>
-    <tbody>
-    {% for name, default, description in opts %}
-        <tr>
-            <td>{{ name }}</td>
-            <td><code>{{ default }}</code></td>
-            <td>{{ description }}</td>
-        </tr>
-    {% endfor %}
-    </tbody>
-    </table>
-{% endfor %}
-{% endblock %}
-
--- a/MoinMoin/apps/admin/views.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/apps/admin/views.py	Sat Jul 02 20:18:34 2011 +0200
@@ -83,7 +83,7 @@
             flash('%s.%s: %s -> %s' % (user_name, key, unicode(oldval), unicode(val), ), "info")
         else:
             flash('modifying %s.%s failed' % (user_name, key, ), "error")
-    return redirect(url_for('admin.userbrowser'))
+    return redirect(url_for('.userbrowser'))
 
 
 @admin.route('/mail_recovery_token', methods=['GET', 'POST', ])
@@ -92,7 +92,7 @@
     Send user an email so he can reset his password.
     """
     flash("mail recovery token not implemented yet")
-    return redirect(url_for('admin.userbrowser'))
+    return redirect(url_for('.userbrowser'))
 
 
 @admin.route('/sysitems_upgrade', methods=['GET', 'POST', ])
@@ -113,7 +113,7 @@
             flash(_('System items upgrade failed due to the following error: %(error)s.', error=e), 'error')
         else:
             flash(_('System items have been upgraded successfully!'))
-        return redirect(url_for('admin.index'))
+        return redirect(url_for('.index'))
 
 
 from MoinMoin.config import default as defaultconfig
--- a/MoinMoin/apps/feed/__init__.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/apps/feed/__init__.py	Sat Jul 02 20:18:34 2011 +0200
@@ -9,7 +9,7 @@
 """
 
 
-from flask import Module
-feed = Module(__name__)
+from flask import Blueprint
+feed = Blueprint('feed', __name__)
 import MoinMoin.apps.feed.views
 
--- a/MoinMoin/apps/frontend/__init__.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/apps/frontend/__init__.py	Sat Jul 02 20:18:34 2011 +0200
@@ -9,7 +9,7 @@
 """
 
 
-from flask import Module
-frontend = Module(__name__)
+from flask import Blueprint
+frontend = Blueprint('frontend', __name__)
 import MoinMoin.apps.frontend.views
 
--- a/MoinMoin/apps/frontend/views.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/apps/frontend/views.py	Sat Jul 02 20:18:34 2011 +0200
@@ -59,7 +59,7 @@
 @frontend.route('/')
 def show_root():
     item_name = app.cfg.item_root
-    location = url_for('frontend.show_item', item_name=item_name)
+    location = url_for('.show_item', item_name=item_name)
     return redirect(location)
 
 @frontend.route('/robots.txt')
@@ -178,7 +178,7 @@
 
 @frontend.route('/+show/<itemname:item_name>')
 def redirect_show_item(item_name):
-    return redirect(url_for('frontend.show_item', item_name=item_name))
+    return redirect(url_for('.show_item', item_name=item_name))
 
 
 @frontend.route('/+dom/<int:rev>/<itemname:item_name>')
@@ -341,7 +341,7 @@
         TextCha(form).amend_form()
         if form.validate():
             item.revert()
-            return redirect(url_for('frontend.show_item', item_name=item_name))
+            return redirect(url_for('.show_item', item_name=item_name))
     return render_template(item.revert_template,
                            item=item, item_name=item_name,
                            rev_no=rev,
@@ -366,7 +366,7 @@
             target = form['target'].value
             comment = form['comment'].value
             item.copy(target, comment)
-            return redirect(url_for('frontend.show_item', item_name=target))
+            return redirect(url_for('.show_item', item_name=target))
     return render_template(item.copy_template,
                            item=item, item_name=item_name,
                            form=form,
@@ -390,7 +390,7 @@
             target = form['target'].value
             comment = form['comment'].value
             item.rename(target, comment)
-            return redirect(url_for('frontend.show_item', item_name=target))
+            return redirect(url_for('.show_item', item_name=target))
     return render_template(item.rename_template,
                            item=item, item_name=item_name,
                            form=form,
@@ -412,7 +412,7 @@
         if form.validate():
             comment = form['comment'].value
             item.delete(comment)
-            return redirect(url_for('frontend.show_item', item_name=item_name))
+            return redirect(url_for('.show_item', item_name=item_name))
     return render_template(item.delete_template,
                            item=item, item_name=item_name,
                            form=form,
@@ -442,7 +442,7 @@
         if form.validate():
             comment = form['comment'].value
             item.destroy(comment=comment, destroy_item=destroy_item)
-            return redirect(url_for('frontend.show_item', item_name=item_name))
+            return redirect(url_for('.show_item', item_name=item_name))
     return render_template(item.destroy_template,
                            item=item, item_name=item_name,
                            rev_no=rev,
@@ -678,7 +678,7 @@
             msg = _('Your quicklink to this page could not be removed.'), "error"
     if msg:
         flash(*msg)
-    return redirect(url_for('frontend.show_item', item_name=item_name))
+    return redirect(url_for('.show_item', item_name=item_name))
 
 
 @frontend.route('/+subscribe/<itemname:item_name>')
@@ -702,7 +702,7 @@
             msg = _('You could not get subscribed to this item.'), "error"
     if msg:
         flash(*msg)
-    return redirect(url_for('frontend.show_item', item_name=item_name))
+    return redirect(url_for('.show_item', item_name=item_name))
 
 
 class ValidRegistration(Validator):
@@ -808,7 +808,7 @@
                     flash(msg, "error")
                 else:
                     flash(_('Account created, please log in now.'), "info")
-                    return redirect(url_for('frontend.show_root'))
+                    return redirect(url_for('.show_root'))
 
     else:
         # not openid registration and no MoinAuth
@@ -834,7 +834,7 @@
                     flash(msg, "error")
                 else:
                     flash(_('Account created, please log in now.'), "info")
-                    return redirect(url_for('frontend.show_root'))
+                    return redirect(url_for('.show_root'))
 
     return render_template(template,
                            item_name=item_name,
@@ -892,7 +892,7 @@
                 if not is_ok:
                     flash(msg, "error")
             flash(_("If this account exists, you will be notified."), "info")
-            return redirect(url_for('frontend.show_root'))
+            return redirect(url_for('.show_root'))
     return render_template('lostpass.html',
                            item_name=item_name,
                            form=form,
@@ -947,7 +947,7 @@
                 flash(_("Your password has been changed, you can log in now."), "info")
             else:
                 flash(_('Your token is invalid!'), "error")
-            return redirect(url_for('frontend.show_root'))
+            return redirect(url_for('.show_root'))
     return render_template('recoverpass.html',
                            item_name=item_name,
                            form=form,
@@ -1015,7 +1015,7 @@
         form = LoginForm.from_flat(request.form)
         if form.validate():
             # we have a logged-in, valid user
-            return redirect(url_for('frontend.show_root'))
+            return redirect(url_for('.show_root'))
         # flash the error messages (if any)
         for msg in flaskg._login_messages:
             flash(msg, "error")
@@ -1032,7 +1032,7 @@
     for key in ['user.id', 'user.auth_method', 'user.auth_attribs', ]:
         if key in session:
             del session[key]
-    return redirect(url_for('frontend.show_root'))
+    return redirect(url_for('.show_root'))
 
 
 class ValidChangePass(Validator):
@@ -1173,7 +1173,7 @@
                 if success:
                     form.update_object(flaskg.user, omit=['submit']) # don't save submit button value :)
                     flaskg.user.save()
-                    return redirect(url_for('frontend.usersettings'))
+                    return redirect(url_for('.usersettings'))
                 else:
                     # reset to valid values
                     form = FormClass.from_object(flaskg.user)
@@ -1207,7 +1207,7 @@
             flaskg.user.setBookmark(tm)
     else:
         flash(_("You must log in to use bookmarks."), "error")
-    return redirect(url_for('frontend.global_history'))
+    return redirect(url_for('.global_history'))
 
 
 @frontend.route('/+diffraw/<path:item_name>')
--- a/MoinMoin/apps/misc/__init__.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/apps/misc/__init__.py	Sat Jul 02 20:18:34 2011 +0200
@@ -8,7 +8,7 @@
 """
 
 
-from flask import Module
-misc = Module(__name__)
+from flask import Blueprint
+misc = Blueprint('misc', __name__, template_folder='templates')
 import MoinMoin.apps.misc.views
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/misc/templates/misc/sitemap.xml	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+{% for item_name, lastmod, changefreq, priority in sitemap -%}
+<url>
+<loc>{{ url_for('frontend.show_item', item_name=item_name, _external=True)|e }}</loc>
+<lastmod>{{ lastmod }}</lastmod>
+<changefreq>{{ changefreq }}</changefreq>
+<priority>{{ priority }}</priority>
+</url>
+{%- endfor %}
+</urlset>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/misc/templates/misc/urls_names.txt	Sat Jul 02 20:18:34 2011 +0200
@@ -0,0 +1,3 @@
+{% for item_name in item_names -%}
+{{ url_for('frontend.show_item', item_name=item_name, _external=True) }} {{ item_name }}
+{% endfor %}
--- a/MoinMoin/apps/misc/templates/sitemap.xml	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-{% for item_name, lastmod, changefreq, priority in sitemap -%}
-<url>
-<loc>{{ url_for('frontend.show_item', item_name=item_name, _external=True)|e }}</loc>
-<lastmod>{{ lastmod }}</lastmod>
-<changefreq>{{ changefreq }}</changefreq>
-<priority>{{ priority }}</priority>
-</url>
-{%- endfor %}
-</urlset>
-
-
--- a/MoinMoin/apps/misc/templates/urls_names.txt	Tue Jun 28 19:45:17 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-{% for item_name in item_names -%}
-{{ url_for('frontend.show_item', item_name=item_name, _external=True) }} {{ item_name }}
-{% endfor %}
--- a/MoinMoin/apps/serve/__init__.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/apps/serve/__init__.py	Sat Jul 02 20:18:34 2011 +0200
@@ -10,7 +10,7 @@
 """
 
 
-from flask import Module
-serve = Module(__name__)
+from flask import Blueprint
+serve = Blueprint('serve', __name__)
 import MoinMoin.apps.serve.views
 
--- a/MoinMoin/templates/base.html	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/templates/base.html	Sat Jul 02 20:18:34 2011 +0200
@@ -30,7 +30,7 @@
     {% endblock %}
 
     {% block head_links %}
-    <link rel="shortcut icon" href="{{ url_for('.static', filename='logos/favicon.ico') }}" />
+    <link rel="shortcut icon" href="{{ url_for('static', filename='logos/favicon.ico') }}" />
     <link rel="archives" href="{{ url_for('frontend.history', item_name=item_name) }}" />
     {% set parent_item = theme_supp.parent_item(item_name) %}
     {%- if parent_item -%}
@@ -49,7 +49,7 @@
     {% block head_scripts %}
     <script src="{{ url_for('serve.files', name='jquery', filename='jquery.min.js') }}"></script>
     <script src="{{ url_for('serve.files', name='svgweb', filename='svg.js') }}"></script>
-    <script src="{{ url_for('.static', filename='js/common.js') }}"></script>
+    <script src="{{ url_for('static', filename='js/common.js') }}"></script>
     <script type="text/x-mathjax-config">
   MathJax.Hub.Config({
     extensions: ["tex2jax.js"],
--- a/MoinMoin/templates/global_index.html	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/templates/global_index.html	Sat Jul 02 20:18:34 2011 +0200
@@ -6,7 +6,7 @@
         <ul>
         {% for fullname, relname, contenttype in index %}
             <li>
-                <a href="{{ url_for('show_item', item_name=fullname) }}"
+                <a href="{{ url_for('.show_item', item_name=fullname) }}"
                    class="{{ contenttype|contenttype_to_class }}">
                     {{ relname }}
                 </a>
--- a/MoinMoin/templates/index.html	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/templates/index.html	Sat Jul 02 20:18:34 2011 +0200
@@ -6,7 +6,7 @@
         <ul>
         {% for fullname, relname, contenttype in index %}
             <li>
-                <a href="{{ url_for('show_item', item_name=fullname) }}"
+                <a href="{{ url_for('.show_item', item_name=fullname) }}"
                    class="{{ contenttype|contenttype_to_class }}">
                     {{ relname }}
                 </a>
--- a/MoinMoin/templates/index2.html	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/templates/index2.html	Sat Jul 02 20:18:34 2011 +0200
@@ -8,7 +8,7 @@
 {% block content %}
     <h1>{{ _("Index of subitems of '%(item_name)s'", item_name=item_name) }}</h1>
 <div id="file_upload">
-    <form action="{{ url_for('jfu_server', item_name=item_name) }}" method="POST" enctype="multipart/form-data">
+    <form action="{{ url_for('.jfu_server', item_name=item_name) }}" method="POST" enctype="multipart/form-data">
         <input type="file" name="data_file" multiple>
         <button type="submit">Upload</button>
         <div class="file_upload_label">Upload files</div>
@@ -33,5 +33,5 @@
 </div>
 <script src="{{ url_for('serve.files', name='fileupload', filename='jquery.fileupload.js') }}"></script>
 <script src="{{ url_for('serve.files', name='fileupload', filename='jquery.fileupload-ui.js') }}"></script>
-<script src="{{ url_for('.static', filename='js/jfu.js') }}"></script>
+<script src="{{ url_for('static', filename='js/jfu.js') }}"></script>
 {% endblock %}
--- a/MoinMoin/templates/snippets.html	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/templates/snippets.html	Sat Jul 02 20:18:34 2011 +0200
@@ -2,7 +2,7 @@
 
 {# Logo in the header #}
 {% macro logo() -%}
-<img src="{{ url_for('.static', filename='logos/moinmoin.png') }}" id="moin-img-logo" alt="Logo">
+<img src="{{ url_for('static', filename='logos/moinmoin.png') }}" id="moin-img-logo" alt="Logo">
 {%- endmacro %}
 
 {# Additional HTML tags inside <head> #}
@@ -37,10 +37,10 @@
 {# Image links in the footer #}
 {% macro creditlogos(start='<ul id="moin-creditlogos"><li>'|safe, end='</li></ul>'|safe, sep='</li><li>'|safe) %}
 {{ start }}
-{{ creditlogo('http://moinmo.in/', url_for('.static', filename='logos/moinmoin_powered.png'),
+{{ creditlogo('http://moinmo.in/', url_for('static', filename='logos/moinmoin_powered.png'),
    'MoinMoin powered', 'This site uses the MoinMoin Wiki software.') }}
 {{ sep }}
-{{ creditlogo('http://moinmo.in/Python', url_for('.static', filename='logos/python_powered.png'),
+{{ creditlogo('http://moinmo.in/Python', url_for('static', filename='logos/python_powered.png'),
    'Python powered', 'MoinMoin is written in Python.') }}
 {{ end }}
 {% endmacro %}
--- a/setup.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/setup.py	Sat Jul 02 20:18:34 2011 +0200
@@ -76,7 +76,7 @@
     install_requires=[
         'blinker>=1.1', # event signalling (e.g. for change notification trigger)
         'docutils>=0.6', # reST markup processing
-        'Flask>=0.6,<0.7', # micro framework
+        'Flask>=0.7.1', # micro framework
         'Flask-Babel>=0.6', # i18n support
         'Flask-Cache>=0.3.2', # caching support
         'Flask-Script>=0.3', # scripting support