mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
upgrades: Finish the reorganisation of views
This commit is contained in:
parent
c539dc6db3
commit
114370c2e0
@ -19,9 +19,16 @@
|
||||
Plinth module for upgrades
|
||||
"""
|
||||
|
||||
from . import upgrades
|
||||
from .upgrades import init
|
||||
from gettext import gettext as _
|
||||
|
||||
from plinth import cfg
|
||||
|
||||
__all__ = ['upgrades', 'init']
|
||||
|
||||
depends = ['plinth.modules.system']
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the module."""
|
||||
menu = cfg.main_menu.get('system:index')
|
||||
menu.add_urlname(_('Software Upgrades'), 'glyphicon-refresh',
|
||||
'upgrades:index', 21)
|
||||
|
||||
@ -23,7 +23,7 @@ from django.conf.urls import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns(
|
||||
'plinth.modules.upgrades.upgrades',
|
||||
'plinth.modules.upgrades.views',
|
||||
url(r'^sys/upgrades/$', 'index', name='index'),
|
||||
url(r'^sys/upgrades/upgrade/$', 'upgrade', name='upgrade'),
|
||||
url(r'^sys/upgrades/upgrade/run/$', 'run', name='run'),
|
||||
|
||||
@ -27,7 +27,6 @@ from gettext import gettext as _
|
||||
|
||||
from .forms import ConfigureForm
|
||||
from plinth import actions
|
||||
from plinth import cfg
|
||||
from plinth import package
|
||||
from plinth.errors import ActionError
|
||||
|
||||
@ -37,13 +36,6 @@ subsubmenu = [{'url': reverse_lazy('upgrades:index'),
|
||||
'text': _('Upgrade Packages')}]
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the module."""
|
||||
menu = cfg.main_menu.get('system:index')
|
||||
menu.add_urlname(_('Software Upgrades'), 'glyphicon-refresh',
|
||||
'upgrades:index', 21)
|
||||
|
||||
|
||||
def on_install():
|
||||
"""Enable automatic upgrades after install."""
|
||||
actions.superuser_run('upgrades', ['enable-auto'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user