forked from DGNum/gestioCOF
PEP8: few more changes
Taken MR comments into account: * `and` is considered a binary operator, thus put at the beginning of the line when splitting a line, * same for `+`, * same for `.` (different reasons).
This commit is contained in:
parent
88bccc0e60
commit
6d68f6638f
8 changed files with 31 additions and 31 deletions
|
@ -102,8 +102,8 @@ class SurveyStatusFilterForm(forms.Form):
|
|||
for question in survey.questions.all():
|
||||
for answer in question.answers.all():
|
||||
name = "question_%d_answer_%d" % (question.id, answer.id)
|
||||
if self.is_bound and\
|
||||
self.data.get(self.add_prefix(name), None):
|
||||
if self.is_bound \
|
||||
and self.data.get(self.add_prefix(name), None):
|
||||
initial = self.data.get(self.add_prefix(name), None)
|
||||
else:
|
||||
initial = "none"
|
||||
|
@ -132,8 +132,8 @@ class EventStatusFilterForm(forms.Form):
|
|||
for option in event.options.all():
|
||||
for choice in option.choices.all():
|
||||
name = "option_%d_choice_%d" % (option.id, choice.id)
|
||||
if self.is_bound and\
|
||||
self.data.get(self.add_prefix(name), None):
|
||||
if self.is_bound \
|
||||
and self.data.get(self.add_prefix(name), None):
|
||||
initial = self.data.get(self.add_prefix(name), None)
|
||||
else:
|
||||
initial = "none"
|
||||
|
@ -309,8 +309,8 @@ class AdminEventForm(forms.Form):
|
|||
initial = commentfield.default
|
||||
if registration is not None:
|
||||
try:
|
||||
initial = registration.comments.\
|
||||
get(commentfield=commentfield).content
|
||||
initial = registration.comments \
|
||||
.get(commentfield=commentfield).content
|
||||
except EventCommentValue.DoesNotExist:
|
||||
pass
|
||||
widget = forms.Textarea if commentfield.fieldtype == "text" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue