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:
Sunil Mohan Adapa authored and Veiko Aasa committed 2020-03-06 13:07:59 +02:00
1 parent fe5bdf290b
commit ea1e7e953f
3 files changed
+13 -7

No files matched your search

-6
View File
@@ -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)
+1 -1
View File
@@ -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
View 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