From fe5bdf290b5e4cd6431e7f6202d54235971dc6bf Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sat, 29 Feb 2020 19:51:18 -0500 Subject: [PATCH] privoxy: Use generic app view Tests performed: - Visit privoxy app view. - Enable/disable privoxy app. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- plinth/modules/privoxy/__init__.py | 5 ----- plinth/modules/privoxy/urls.py | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/plinth/modules/privoxy/__init__.py b/plinth/modules/privoxy/__init__.py index 7033f7dc9..40ee6c082 100644 --- a/plinth/modules/privoxy/__init__.py +++ b/plinth/modules/privoxy/__init__.py @@ -13,7 +13,6 @@ from plinth.daemon import Daemon from plinth.modules.apache.components import diagnose_url from plinth.modules.firewall.components import Firewall from plinth.utils import format_lazy -from plinth.views import AppView from .manifest import backup # noqa, pylint: disable=unused-import @@ -104,10 +103,6 @@ def setup(helper, old_version=None): helper.call('post', app.enable) -class PrivoxyAppView(AppView): - app_id = 'privoxy' - - def diagnose_url_with_proxy(): """Run a diagnostic on a URL with a proxy.""" url = 'https://debian.org/' # Gives a simple redirect to www. diff --git a/plinth/modules/privoxy/urls.py b/plinth/modules/privoxy/urls.py index f540f20b0..eb908a8c4 100644 --- a/plinth/modules/privoxy/urls.py +++ b/plinth/modules/privoxy/urls.py @@ -5,8 +5,8 @@ URLs for the Privoxy module. from django.conf.urls import url -from plinth.modules.privoxy import PrivoxyAppView +from plinth.views import AppView urlpatterns = [ - url(r'^apps/privoxy/$', PrivoxyAppView.as_view(), name='index'), + url(r'^apps/privoxy/$', AppView.as_view(app_id='privoxy'), name='index'), ]