From b4279cf31372012f032bbabd73f022cce8a799e5 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 8 Mar 2019 01:58:41 +0100 Subject: [PATCH 1/9] environment: coding style (#29240) --- hobo/environment/forms.py | 26 ++++++++-- hobo/environment/models.py | 99 +++++++++++++++++++++++--------------- hobo/environment/urls.py | 40 ++++++++++----- hobo/environment/utils.py | 33 ++++++++++--- hobo/environment/views.py | 34 ++++++++++--- 5 files changed, 164 insertions(+), 68 deletions(-) diff --git a/hobo/environment/forms.py b/hobo/environment/forms.py index 8f46d77..00e1977 100644 --- a/hobo/environment/forms.py +++ b/hobo/environment/forms.py @@ -1,10 +1,25 @@ +# hobo - portal to configure and deploy applications +# Copyright (C) 2015-2019 Entr'ouvert +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + from django import forms from django.conf import settings from django.contrib import messages from django.http import HttpResponseRedirect from django.template.defaultfilters import slugify from django.utils.translation import ugettext_lazy as _ -from django.core.validators import validate_email from .models import (Authentic, Wcs, Passerelle, Variable, Combo, Fargo, Welco, @@ -12,7 +27,8 @@ from .models import (Authentic, Wcs, Passerelle, Variable, Combo, Fargo, Welco, from .utils import get_setting_variable EXCLUDED_FIELDS = ('last_operational_check_timestamp', - 'last_operational_success_timestamp', 'secret_key', 'secondary') + 'last_operational_success_timestamp', 'secret_key', + 'secondary') class BaseForm(forms.ModelForm): @@ -29,8 +45,8 @@ class BaseForm(forms.ModelForm): # choice that was selected as an additional, disabled,