Ejemplo n.º 1
0
def delete(request, name):
    """Handle deleting wikis/blogs, showing a confirmation dialog first.

    On GET, display a confirmation page.
    On POST, delete the wiki/blog.
    """
    if request.method == 'POST':
        try:
            actions.superuser_run('ikiwiki', ['delete', '--name', name])
            messages.success(request, _('{name} deleted.').format(name=name))
            frontpage.remove_shortcut('ikiwiki_' + name)
        except actions.ActionError as error:
            messages.error(request, _('Could not delete {name}: {error}')
                           .format(name=name, error=error))

        return redirect(reverse_lazy('ikiwiki:manage'))

    return TemplateResponse(request, 'ikiwiki_delete.html',
                            {'title': _('Delete Wiki or Blog'),
                             'subsubmenu': subsubmenu,
                             'name': name})
Ejemplo n.º 2
0
def delete(request, name):
    """Handle deleting wikis/blogs, showing a confirmation dialog first.

    On GET, display a confirmation page.
    On POST, delete the wiki/blog.
    """
    if request.method == 'POST':
        try:
            actions.superuser_run('ikiwiki', ['delete', '--name', name])
            messages.success(request, _('{name} deleted.').format(name=name))
            frontpage.remove_shortcut('ikiwiki_' + name)
        except actions.ActionError as error:
            messages.error(
                request,
                _('Could not delete {name}: {error}').format(name=name,
                                                             error=error))

        return redirect(reverse_lazy('ikiwiki:manage'))

    return TemplateResponse(request, 'ikiwiki_delete.html', {
        'title': _('Delete Wiki or Blog'),
        'subsubmenu': subsubmenu,
        'name': name
    })
Ejemplo n.º 3
0
def disable():
    """Enable the module."""
    actions.superuser_run('tahoe-lafs', ['disable'])
    frontpage.remove_shortcut('tahoe-lafs')
Ejemplo n.º 4
0
def disable():
    """Enable the module."""
    actions.superuser_run('matrixsynapse', ['disable'])
    frontpage.remove_shortcut('matrixsynapse')
Ejemplo n.º 5
0
def disable():
    """Disable the module."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('minetest')
Ejemplo n.º 6
0
def disable():
    """Enable the module."""
    actions.superuser_run('syncthing', ['disable'])
    frontpage.remove_shortcut('syncthing')
Ejemplo n.º 7
0
def disable():
    """Enable the module."""
    actions.superuser_run('ejabberd', ['disable'])
    frontpage.remove_shortcut('ejabberd')
Ejemplo n.º 8
0
def disable():
    """Disable the module."""
    actions.superuser_run('radicale', ['disable'])
    frontpage.remove_shortcut('radicale')
Ejemplo n.º 9
0
def disable():
    """Disable service."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('shadowsocks')
Ejemplo n.º 10
0
def disable():
    frontpage.remove_shortcut('jsxc')
Ejemplo n.º 11
0
def disable():
    """Disable the module."""
    actions.superuser_run('gnu-social', ['disable'])
    frontpage.remove_shortcut('gnusocial*')
Ejemplo n.º 12
0
def disable():
    """Disable service."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('shadowsocks')
Ejemplo n.º 13
0
def disable():
    """Enable the module."""
    actions.superuser_run('ejabberd', ['disable'])
    frontpage.remove_shortcut('ejabberd')
Ejemplo n.º 14
0
def disable():
    """Enable the module."""
    actions.superuser_run("transmission", ["disable"])
    frontpage.remove_shortcut("transmission")
Ejemplo n.º 15
0
def disable():
    """Enable the module."""
    actions.superuser_run('roundcube', ['disable'])
    frontpage.remove_shortcut('roundcube')
Ejemplo n.º 16
0
def disable():
    """Enable the module."""
    actions.superuser_run('ikiwiki', ['disable'])
    frontpage.remove_shortcut('ikiwiki*')
Ejemplo n.º 17
0
def disable():
    frontpage.remove_shortcut('jsxc')
Ejemplo n.º 18
0
def disable():
    """Enable the module."""
    actions.superuser_run('transmission', ['disable'])
    frontpage.remove_shortcut('transmission')
Ejemplo n.º 19
0
def disable():
    """Enable the module."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('openvpn')
Ejemplo n.º 20
0
def disable():
    """Disable the module."""
    actions.superuser_run('diaspora', ['disable'])
    frontpage.remove_shortcut('diaspora')
Ejemplo n.º 21
0
def disable():
    """Enable the module."""
    actions.superuser_run('ikiwiki', ['disable'])
    frontpage.remove_shortcut('ikiwiki*')
Ejemplo n.º 22
0
def disable():
    """Enable the module."""
    actions.superuser_run('xmpp', ['disable'])
    frontpage.remove_shortcut('jsxc')
    frontpage.remove_shortcut('xmpp')
Ejemplo n.º 23
0
def disable():
    """Enable the module."""
    actions.superuser_run('tahoe-lafs', ['disable'])
    frontpage.remove_shortcut('tahoe-lafs')
Ejemplo n.º 24
0
def disable():
    """Disable the module."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('repro')
Ejemplo n.º 25
0
def disable():
    """Enable the module."""
    actions.superuser_run('transmission', ['disable'])
    frontpage.remove_shortcut('transmission')
Ejemplo n.º 26
0
def disable():
    """Enable the module."""
    actions.superuser_run('syncthing', ['disable'])
    frontpage.remove_shortcut('syncthing')
Ejemplo n.º 27
0
def disable():
    """Enable the module."""
    actions.superuser_run("shaarli", ["disable"])
    frontpage.remove_shortcut("shaarli")