mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
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:
parent
995af05866
commit
1dd75990b1
@ -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'
|
||||
|
||||
@ -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'),
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user