mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Add flake8 to gitlib-ci - closes #58
And fix the rest of the flake8 errors. Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
f81b1751ce
commit
5439084c84
63 files changed
+105
-82
No files matched your search
@@ -62,11 +62,12 @@ class ConfigurationForm(forms.Form):
|
||||
hostname = forms.CharField(
|
||||
label=ugettext_lazy('Hostname'), help_text=format_lazy(
|
||||
ugettext_lazy(
|
||||
'Hostname is the local name by which other devices on the local '
|
||||
'network can reach your {box_name}. It must start and end with '
|
||||
'an alphabet or a digit and have as interior characters only '
|
||||
'alphabets, digits and hyphens. Total length must be 63 '
|
||||
'characters or less.'), box_name=ugettext_lazy(cfg.box_name)),
|
||||
'Hostname is the local name by which other devices on the '
|
||||
'local network can reach your {box_name}. It must start and '
|
||||
'end with an alphabet or a digit and have as interior '
|
||||
'characters only alphabets, digits and hyphens. Total '
|
||||
'length must be 63 characters or less.'),
|
||||
box_name=ugettext_lazy(cfg.box_name)),
|
||||
validators=[
|
||||
validators.RegexValidator(HOSTNAME_REGEX,
|
||||
ugettext_lazy('Invalid hostname'))
|
||||
@@ -76,12 +77,13 @@ class ConfigurationForm(forms.Form):
|
||||
label=ugettext_lazy('Domain Name'), help_text=format_lazy(
|
||||
ugettext_lazy(
|
||||
'Domain name is the global name by which other devices on the '
|
||||
'Internet can reach your {box_name}. It must consist of labels '
|
||||
'separated by dots. Each label must start and end with an '
|
||||
'alphabet or a digit and have as interior characters only '
|
||||
'alphabets, digits and hyphens. Length of each label must be 63 '
|
||||
'characters or less. Total length of domain name must be 253 '
|
||||
'characters or less.'), box_name=ugettext_lazy(cfg.box_name)),
|
||||
'Internet can reach your {box_name}. It must consist of '
|
||||
'labels separated by dots. Each label must start and end '
|
||||
'with an alphabet or a digit and have as interior characters '
|
||||
'only alphabets, digits and hyphens. Length of each label '
|
||||
'must be 63 characters or less. Total length of domain name '
|
||||
'must be 253 characters or less.'),
|
||||
box_name=ugettext_lazy(cfg.box_name)),
|
||||
required=False, validators=[
|
||||
validators.RegexValidator(
|
||||
r'^[a-zA-Z0-9]([-a-zA-Z0-9.]{,251}[a-zA-Z0-9])?$',
|
||||
|
||||
Reference in new issue
Block a user