Projet

Général

Profil

0002-lingo-PEP8ize-TipiPaymentFormCell-35008.patch

Benjamin Dauvergne, 23 juillet 2019 12:06

Télécharger (2,52 ko)

Voir les différences:

Subject: [PATCH 2/2] lingo: PEP8ize TipiPaymentFormCell (#35008)

 combo/apps/lingo/models.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
combo/apps/lingo/models.py
722 722
    ('rolmre', _('ROLMRE')),
723 723
)
724 724

  
725

  
725 726
@register_cell_class
726 727
class TipiPaymentFormCell(CellBase):
727 728
    title = models.CharField(_('Title'), max_length=150, blank=True)
728 729
    url = models.URLField(_('TIPI payment service URL'), default='https://www.tipi.budget.gouv.fr/tpa/paiement.web')
729 730
    regies = models.CharField(_('Regies'), help_text=_('separated by commas'), max_length=256)
730
    control_protocol = models.CharField(_('Control protocol'), max_length=8, choices=TIPI_CONTROL_PROCOTOLS, default='pesv2')
731
    control_protocol = models.CharField(_('Control protocol'), max_length=8, choices=TIPI_CONTROL_PROCOTOLS,
732
                                        default='pesv2')
731 733
    exer = models.CharField('Exer', max_length=4, blank=True, help_text=_('Default value to be used in form'))
732 734
    idpce = models.CharField('IDPCE', max_length=8, blank=True, help_text=_('Default value to be used in form'))
733 735
    idligne = models.CharField('IDLIGNE', max_length=6, blank=True, help_text=_('Default value to be used in form'))
......
767 769
                # special pattern for rolrec
768 770
                if field == 'rolrec':
769 771
                    field_pattern = '[A-Z0-9]+'
770
                reference_fields.append({'name': field, 'length': form_fields[field].max_length,
771
                                         'placeholder': '0'*form_fields[field].max_length,
772
                                         'pattern': field_pattern,
773
                                         'protocol': definition['protocol']})
772
                reference_fields.append({
773
                    'name': field,
774
                    'length': form_fields[field].max_length,
775
                    'placeholder': '0' * form_fields[field].max_length,
776
                    'pattern': field_pattern,
777
                    'protocol': definition['protocol']
778
                })
774 779
        context['title'] = self.title
775 780
        context['url'] = self.url
776 781
        context['mode'] = 'T' if self.test_mode else 'M'
777
-