mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
dynamicdns: code style fixes
This commit is contained in:
parent
1e19508b95
commit
3c3d280792
@ -62,7 +62,8 @@ def init():
|
|||||||
if current_status['enabled']:
|
if current_status['enabled']:
|
||||||
domain_added.send_robust(
|
domain_added.send_robust(
|
||||||
sender='dynamicdns', domain_type='dynamicdnsservice',
|
sender='dynamicdns', domain_type='dynamicdnsservice',
|
||||||
name=current_status['dynamicdns_domain'], description=_('Dynamic DNS Service'))
|
name=current_status['dynamicdns_domain'],
|
||||||
|
description=_('Dynamic DNS Service'))
|
||||||
|
|
||||||
|
|
||||||
def setup(helper, old_version=None):
|
def setup(helper, old_version=None):
|
||||||
|
|||||||
@ -15,13 +15,18 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
"""
|
||||||
|
Forms and views for the dynamicsdns module.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.core import validators
|
from django.core import validators
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import ugettext as _, ugettext_lazy
|
from django.utils.translation import ugettext as _, ugettext_lazy
|
||||||
from django.template.response import TemplateResponse
|
from django.template.response import TemplateResponse
|
||||||
import logging
|
|
||||||
|
|
||||||
from plinth import actions
|
from plinth import actions
|
||||||
from plinth import cfg
|
from plinth import cfg
|
||||||
@ -359,14 +364,14 @@ def _apply_changes(request, old_status, new_status):
|
|||||||
if old_status['enabled']:
|
if old_status['enabled']:
|
||||||
domain_removed.send_robust(
|
domain_removed.send_robust(
|
||||||
sender='dynamicdns', domain_type='dynamicdnsservice',
|
sender='dynamicdns', domain_type='dynamicdnsservice',
|
||||||
name = old_status['dynamicdns_domain']
|
name=old_status['dynamicdns_domain'])
|
||||||
)
|
|
||||||
_run(['stop'])
|
_run(['stop'])
|
||||||
|
|
||||||
if new_status['enabled']:
|
if new_status['enabled']:
|
||||||
domain_added.send_robust(
|
domain_added.send_robust(
|
||||||
sender='dynamicdns', domain_type='dynamicdnsservice',
|
sender='dynamicdns', domain_type='dynamicdnsservice',
|
||||||
name=new_status['dynamicdns_domain'], description=_('Dynamic DNS Service'))
|
name=new_status['dynamicdns_domain'],
|
||||||
|
description=_('Dynamic DNS Service'))
|
||||||
_run(['start'])
|
_run(['start'])
|
||||||
|
|
||||||
messages.success(request, _('Configuration updated'))
|
messages.success(request, _('Configuration updated'))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user