Projet

Général

Profil

Development #32934

grand ménage de printemps

Ajouté par Benjamin Dauvergne il y a presque 5 ans. Mis à jour il y a presque 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
09 mai 2019
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Toutes les vues dans views.py et tous les formulaires dans le package authentic2.forms, ça devrait simplifier le travail sur la réorganisation des URLs.

Finalememt je suis passé un peu partout.


Fichiers


Demandes liées

Bloque Plugin FS FranceConnect - Development #32866: nettoyage PEP8, codestyle, python3Fermé07 mai 2019

Actions

Révisions associées

Révision 9fbbf051 (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

spring cleaning (#32934)

  • reorganize views and forms
  • add copyright headers to all .py files
  • fix all style errors reported by flake8

Révision beca608c (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

adapts to spring cleaning in authentic (#32866)

See #32934.

Révision 1c40ec3f (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

adapts to spring cleaning in authentic (#32866)

See #32934.

Historique

#1

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

Un peu costaud mais ça passe les tests localement, je vais faire le tour du coverage pour voir si je peux l'augmenter au passage pour ne rien rater.

#2

Mis à jour par Frédéric Péters il y a presque 5 ans

Les paramètres A2_REGISTRATION_URLCONF, et A2_REGISTRATION*FORM_CLASS, ils semblent retirés, ils n'étaient utilisés nulle part ?

#3

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

Frédéric Péters a écrit :

Les paramètres A2_REGISTRATION_URLCONF, et A2_REGISTRATION*FORM_CLASS, ils semblent retirés, ils n'étaient utilisés nulle part ?

Je vais faire une recherche approfondie mais je pense que ça date de portail-citoyen.

git:/home/git/repositories$ (for i in *.git; do (cd $i; git grep A2_REGISTRATION_URLCONF master && echo $i); done) 2>/dev/null
master:src/authentic2/app_settings.py:    A2_REGISTRATION_URLCONF = Setting(default='authentic2.registration_backend.urls',
master:src/authentic2/urls.py:    url(r'^accounts/', include(app_settings.A2_REGISTRATION_URLCONF)),
authentic.git
git:/home/git/repositories$ (for i in *.git; do (cd $i; git grep A2_REGISTRATION.*CLASS master && echo $i); done) 2>/dev/null
master:src/authentic2_auth_fc/views.py:    a2_app_settings.A2_REGISTRATION_SET_PASSWORD_FORM_CLASS)
authentic2-auth-fc.git
master:src/authentic2/app_settings.py:    A2_REGISTRATION_FORM_CLASS = Setting(default='authentic2.registration_backend.forms.RegistrationForm',
master:src/authentic2/app_settings.py:    A2_REGISTRATION_COMPLETION_FORM_CLASS = Setting(default='authentic2.registration_backend.forms.RegistrationCompletionForm',
master:src/authentic2/app_settings.py:    A2_REGISTRATION_SET_PASSWORD_FORM_CLASS = Setting(default='authentic2.registration_backend.forms.SetPasswordForm',
master:src/authentic2/app_settings.py:    A2_REGISTRATION_CHANGE_PASSWORD_FORM_CLASS = Setting(default='authentic2.registration_backend.forms.PasswordChangeForm',
master:src/authentic2/profile_urls.py:        app_settings.A2_REGISTRATION_SET_PASSWORD_FORM_CLASS)
master:src/authentic2/profile_urls.py:        app_settings.A2_REGISTRATION_CHANGE_PASSWORD_FORM_CLASS)
master:src/authentic2/registration_backend/views.py:    form_class = import_module_or_class(app_settings.A2_REGISTRATION_FORM_CLASS)
authentic.git
master:compte_agglo_montpellier/settings.py:A2_REGISTRATION_FORM_CLASS = 'compte_agglo_montpellier.registration_forms.RegistrationForm'
master:compte_agglo_montpellier/settings.py:A2_REGISTRATION_SET_PASSWORD_FORM_CLASS = 'compte_agglo_montpellier.registration_forms.SetPasswordForm'
master:compte_agglo_montpellier/settings.py:A2_REGISTRATION_CHANGE_PASSWORD_FORM_CLASS = 'compte_agglo_montpellier.registration_forms.PasswordChangeForm'
compte-agglo-montpellier.git
master:compte_meyzieu/settings.py:A2_REGISTRATION_FORM_CLASS = 'compte_meyzieu.registration_backend.forms.RegistrationForm'
compte-meyzieu.git
master:portail_citoyen/settings.py:#A2_REGISTRATION_FORM_CLASS = 'compte_orleans.registration_backend.forms.RegistrationForm'
portail-citoyen.git
git:/home/git/repositories$ 

Donc un coup d'oeuil à jeter du coté module FC mais ça devrait être tout.

#4

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

J'ai mis à jour #32866 avec les adaptations nécessaire coté a2-auth-fc pour ce ticket.

#5

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

#6

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

  • Sujet changé de faire du ménage dans les vues et les formulaires à grand ménage de printemps
  • Description mis à jour (diff)
#8

Mis à jour par Nicolas Roche il y a presque 5 ans

j'ai trouvé ça :

<<<
raise forms.ValidationError('You must select a maximum of %s choice%s.'
% (apnumber(self.max_choices), pluralize(self.max_choices)))
---
raise forms.ValidationError('You must select a maximum of %s choice %s.' % (
apnumber(self.max_choices), pluralize(self.max_choices)))
>>>

ici l'absence d'espace dans 'choice%s' devrait être conservée.

#9

Mis à jour par Frédéric Péters il y a presque 5 ans

(ce n'est pas comme ça qu'on gère correctement les pluriels → ngettext)

#10

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

Frédéric Péters a écrit :

(ce n'est pas comme ça qu'on gère correctement les pluriels → ngettext)

La chaîne n'est même pas traduite, c'est du ménage juste. Le champ n'est même pas utilisé dans le front juste dans l'admin.

#11

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

Benjamin Dauvergne a écrit :

Frédéric Péters a écrit :

(ce n'est pas comme ça qu'on gère correctement les pluriels → ngettext)

La chaîne n'est même pas traduite, c'est du ménage juste. Le champ n'est même pas utilisé dans le front juste dans l'admin.

Il n'est même pas utilisé du tout, hop à la trappe.

#12

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

Benjamin Dauvergne a écrit :

Benjamin Dauvergne a écrit :

Frédéric Péters a écrit :

(ce n'est pas comme ça qu'on gère correctement les pluriels → ngettext)

La chaîne n'est même pas traduite, c'est du ménage juste. Le champ n'est même pas utilisé dans le front juste dans l'admin.

Il n'est même pas utilisé du tout, hop à la trappe.

Je dis une bêtise c'est utilisé sur accepted_name_id_format.

#13

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

Bon c'est tout ? je peux pousser ? :)

#14

Mis à jour par Nicolas Roche il y a presque 5 ans

  • Statut changé de Solution proposée à Solution validée

Au cas où tu veuilles peaufiner, tu as enlevés l'espace au début mais pas à la fin sur ces 2 lignes :

[lasso.SAML2_METADATA_BINDING_POST ], 'acs'),),
content = (random.SystemRandom().choice(ALPHABET) for x in range(c) )

Je n'ai pas pu vérifier tous les retraits des imports, mais je fais confiance à ton vi.
Pour moi c'est bon.

#15

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 9fbbf0519a66cbc72e0c56d55b46408eb94ec3fc
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Wed May 8 10:56:49 2019 +0200

    spring cleaning (#32934)

    * reorganize views and forms
    * add copyright headers to all .py files
    * fix all style errors reported by flake8
#16

Mis à jour par Frédéric Péters il y a presque 5 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF