changeset 2016:3e8c910f66f8

remove half-broken and not needed sysitems_upgrade code + templates, fixes #86
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 02 Mar 2013 17:57:45 +0100
parents 181fad10920a
children 615ca978863f
files MoinMoin/apps/admin/templates/admin/index.html MoinMoin/apps/admin/templates/admin/sysitems_upgrade.html MoinMoin/apps/admin/views.py
diffstat 3 files changed, 0 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/admin/templates/admin/index.html	Sat Mar 02 17:31:21 2013 +0100
+++ b/MoinMoin/apps/admin/templates/admin/index.html	Sat Mar 02 17:57:45 2013 +0100
@@ -3,7 +3,6 @@
 <h1>{{ _("Admin Menu") }}</h1>
 <ul>
     <li><a href="{{ url_for('admin.userbrowser') }}">{{ _("Users") }}</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') }}">{{ _("Wiki Configuration Help") }}</a></li>
 </ul>
--- a/MoinMoin/apps/admin/templates/admin/sysitems_upgrade.html	Sat Mar 02 17:31:21 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("Upgrade System Items") }}</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/views.py	Sat Mar 02 17:31:21 2013 +0100
+++ b/MoinMoin/apps/admin/views.py	Sat Mar 02 17:57:45 2013 +0100
@@ -97,27 +97,6 @@
     return redirect(url_for('.userbrowser'))
 
 
-@admin.route('/sysitems_upgrade', methods=['GET', 'POST', ])
-@require_permission(SUPERUSER)
-def sysitems_upgrade():
-    from MoinMoin.storage.backends import upgrade_sysitems  # XXX broken import, either fix or kill this
-    from MoinMoin.storage.error import BackendError
-    if request.method == 'GET':
-        action = 'syspages_upgrade'
-        label = 'Upgrade System Pages'
-        return render_template('admin/sysitems_upgrade.html',
-                               title_name=_(u"System items upgrade"))
-    if request.method == 'POST':
-        xmlfile = request.files.get('xmlfile')
-        try:
-            upgrade_sysitems(xmlfile)
-        except BackendError as e:
-            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('.index'))
-
-
 from MoinMoin.config import default as defaultconfig