mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
added some comments
This commit is contained in:
parent
ce057ebd22
commit
808062da11
@ -168,16 +168,19 @@ class ConfigureForm(forms.Form):
|
|||||||
service_type = cleaned_data.get('service_type')
|
service_type = cleaned_data.get('service_type')
|
||||||
old_dynamicdns_secret = self.initial['dynamicdns_secret']
|
old_dynamicdns_secret = self.initial['dynamicdns_secret']
|
||||||
|
|
||||||
|
"""clear the fields which are not in use"""
|
||||||
if service_type == '1':
|
if service_type == '1':
|
||||||
dynamicdns_update_url = ""
|
dynamicdns_update_url = ""
|
||||||
else:
|
else:
|
||||||
dynamicdns_server = ""
|
dynamicdns_server = ""
|
||||||
|
|
||||||
|
"""check if gnudip server or update URL is filled"""
|
||||||
if not dynamicdns_update_url and not dynamicdns_server:
|
if not dynamicdns_update_url and not dynamicdns_server:
|
||||||
raise forms.ValidationError('please give update URL or \
|
raise forms.ValidationError('please give update URL or \
|
||||||
a GnuDIP Server')
|
a GnuDIP Server')
|
||||||
LOGGER.info('no server address given')
|
LOGGER.info('no server address given')
|
||||||
|
|
||||||
|
"""check if a password was set before or a password is set now"""
|
||||||
if not dynamicdns_secret and not old_dynamicdns_secret:
|
if not dynamicdns_secret and not old_dynamicdns_secret:
|
||||||
raise forms.ValidationError('please give a password')
|
raise forms.ValidationError('please give a password')
|
||||||
LOGGER.info('no password given')
|
LOGGER.info('no password given')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user