avahi: Use generic app view

Tests performed:

- Visit avahi app view.

- Enable/disable avahi.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2020-02-29 19:50:34 -05:00 committed by Veiko Aasa
parent 995af05866
commit 1dd75990b1
No known key found for this signature in database
GPG Key ID: 478539CAE680674E
2 changed files with 2 additions and 7 deletions

View File

@ -14,7 +14,6 @@ from plinth.modules.firewall.components import Firewall
from plinth.modules.names.components import DomainType
from plinth.signals import domain_added, domain_removed, post_hostname_change
from plinth.utils import format_lazy
from plinth.views import AppView
from .manifest import backup # noqa, pylint: disable=unused-import
@ -109,7 +108,3 @@ def on_post_hostname_change(sender, old_hostname, new_hostname, **kwargs):
name=old_hostname + '.local')
domain_added.send_robust(sender='avahi', domain_type='domain-type-local',
name=new_hostname + '.local', services='__all__')
class AvahiAppView(AppView):
app_id = 'avahi'

View File

@ -5,8 +5,8 @@ URLs for the service discovery module.
from django.conf.urls import url
from plinth.modules.avahi import AvahiAppView
from plinth.views import AppView
urlpatterns = [
url(r'^sys/avahi/$', AvahiAppView.as_view(), name='index'),
url(r'^sys/avahi/$', AppView.as_view(app_id='avahi'), name='index'),
]