示例#1
0
文件: views.py 项目: fonfon/Plinth
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})
示例#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
    })
示例#3
0
def disable():
    """Enable the module."""
    actions.superuser_run('tahoe-lafs', ['disable'])
    frontpage.remove_shortcut('tahoe-lafs')
示例#4
0
文件: __init__.py 项目: KLGLUG/Plinth
def disable():
    """Enable the module."""
    actions.superuser_run('matrixsynapse', ['disable'])
    frontpage.remove_shortcut('matrixsynapse')
示例#5
0
def disable():
    """Disable the module."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('minetest')
示例#6
0
def disable():
    """Enable the module."""
    actions.superuser_run('syncthing', ['disable'])
    frontpage.remove_shortcut('syncthing')
示例#7
0
文件: __init__.py 项目: niejn/Plinth
def disable():
    """Enable the module."""
    actions.superuser_run('ejabberd', ['disable'])
    frontpage.remove_shortcut('ejabberd')
示例#8
0
文件: __init__.py 项目: fonfon/Plinth
def disable():
    """Disable the module."""
    actions.superuser_run('radicale', ['disable'])
    frontpage.remove_shortcut('radicale')
示例#9
0
def disable():
    """Disable service."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('shadowsocks')
示例#10
0
文件: __init__.py 项目: fonfon/Plinth
def disable():
    frontpage.remove_shortcut('jsxc')
示例#11
0
def disable():
    """Disable the module."""
    actions.superuser_run('gnu-social', ['disable'])
    frontpage.remove_shortcut('gnusocial*')
示例#12
0
def disable():
    """Disable service."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('shadowsocks')
示例#13
0
文件: __init__.py 项目: fonfon/Plinth
def disable():
    """Enable the module."""
    actions.superuser_run('ejabberd', ['disable'])
    frontpage.remove_shortcut('ejabberd')
示例#14
0
def disable():
    """Enable the module."""
    actions.superuser_run("transmission", ["disable"])
    frontpage.remove_shortcut("transmission")
示例#15
0
def disable():
    """Enable the module."""
    actions.superuser_run('roundcube', ['disable'])
    frontpage.remove_shortcut('roundcube')
示例#16
0
文件: __init__.py 项目: niejn/Plinth
def disable():
    """Enable the module."""
    actions.superuser_run('ikiwiki', ['disable'])
    frontpage.remove_shortcut('ikiwiki*')
示例#17
0
def disable():
    frontpage.remove_shortcut('jsxc')
示例#18
0
def disable():
    """Enable the module."""
    actions.superuser_run('transmission', ['disable'])
    frontpage.remove_shortcut('transmission')
示例#19
0
def disable():
    """Enable the module."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('openvpn')
示例#20
0
def disable():
    """Disable the module."""
    actions.superuser_run('diaspora', ['disable'])
    frontpage.remove_shortcut('diaspora')
示例#21
0
文件: __init__.py 项目: fonfon/Plinth
def disable():
    """Enable the module."""
    actions.superuser_run('ikiwiki', ['disable'])
    frontpage.remove_shortcut('ikiwiki*')
示例#22
0
def disable():
    """Enable the module."""
    actions.superuser_run('xmpp', ['disable'])
    frontpage.remove_shortcut('jsxc')
    frontpage.remove_shortcut('xmpp')
示例#23
0
def disable():
    """Enable the module."""
    actions.superuser_run('tahoe-lafs', ['disable'])
    frontpage.remove_shortcut('tahoe-lafs')
示例#24
0
def disable():
    """Disable the module."""
    actions.superuser_run('service', ['disable', managed_services[0]])
    frontpage.remove_shortcut('repro')
示例#25
0
文件: __init__.py 项目: fonfon/Plinth
def disable():
    """Enable the module."""
    actions.superuser_run('transmission', ['disable'])
    frontpage.remove_shortcut('transmission')
示例#26
0
def disable():
    """Enable the module."""
    actions.superuser_run('syncthing', ['disable'])
    frontpage.remove_shortcut('syncthing')
示例#27
0
def disable():
    """Enable the module."""
    actions.superuser_run("shaarli", ["disable"])
    frontpage.remove_shortcut("shaarli")