mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
infinoted: Move views to a separate views module
Tests performed: - Visit infinoted app view. - Enable/disable infinoted. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
fe5bdf290b
commit
ea1e7e953f
@ -12,7 +12,6 @@ from plinth import cfg, frontpage, menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.utils import format_lazy
|
||||
from plinth.views import AppView
|
||||
|
||||
from .manifest import backup, clients # noqa, pylint: disable=unused-import
|
||||
|
||||
@ -83,11 +82,6 @@ def init():
|
||||
app.set_enabled(True)
|
||||
|
||||
|
||||
class InfinotedAppView(AppView):
|
||||
app_id = 'infinoted'
|
||||
port_forwarding_info = port_forwarding_info
|
||||
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
helper.install(managed_packages)
|
||||
|
||||
@ -5,7 +5,7 @@ URLs for the infinoted module.
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from plinth.modules.infinoted import InfinotedAppView
|
||||
from .views import InfinotedAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/infinoted/$', InfinotedAppView.as_view(), name='index'),
|
||||
|
||||
12
plinth/modules/infinoted/views.py
Normal file
12
plinth/modules/infinoted/views.py
Normal file
@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""
|
||||
Views for the infinoted app.
|
||||
"""
|
||||
from plinth.modules import infinoted
|
||||
from plinth.views import AppView
|
||||
|
||||
|
||||
class InfinotedAppView(AppView):
|
||||
"""Main app view for Infinoted."""
|
||||
app_id = 'infinoted'
|
||||
port_forwarding_info = infinoted.port_forwarding_info
|
||||
Loading…
x
Reference in New Issue
Block a user