-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin: Correction de l'export des entreprises [GEN-1861] #4416
Conversation
97640f9
to
8a3e99a
Compare
8a3e99a
to
7012a58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ça me semble très bien mais il faudrait rajouter un ou deux petits tests (idéalement avec un assertNumQueries
pour vérifier que le select_related
se fait bien.
7012a58
to
2634272
Compare
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: pypi/diff-match-patch@20230430, pypi/diff-match-patch@20230430, pypi/django-import-export@4.1.0, pypi/django-import-export@4.1.0, pypi/tablib@3.5.0, pypi/tablib@3.5.0 |
C'est tout corrigé. Je me demande en revanche si le Serializer est la meilleurs méthode pour gérer les exports de l'admin. Je vois 3 manières de faire les choses, et je veux bien ton avis :
|
5f38d2b
to
d80c19f
Compare
Si tu n'avais encore rien fait je t'aurais dit de partir sur la solution ad-hoc (la 2) mais maintenant que la 1 est faite on peut également la garder. Après je suis allé voir l'action |
d80c19f
to
24b758d
Compare
merci pour l'avis, |
🤔 Pourquoi ?
L'actuel ne marche pas depuis des mises à jour de django-import-export
🍰 Comment ?
On remplace la lib externe par un petit morceau de code qui utilise un serializer DRF pour exporter dans un fichier XLSX
🚨 À vérifier
🏝️ Comment tester
💻 Captures d'écran