-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Amélioration de l'extraction de données
- Ajout de nouveaux champs dans l'export, - Ajout des headers dans tuple pour éviter d'être dépendant du verbose_name et éviter migrations, etc... - Gestion des champs imbriqués (cf. `get_field_value` et champs dans les listes (exemple: champ1__champ2) - La méthode export a été modifiée pour améliorer le format CSV : - `csv.QUOTE_ALL` : met des guillemets autour de chaque valeur, évitant les erreurs avec les virgules et caractères spéciaux. - `doublequote=True` : double les guillemets dans le texte. Exemple : Avant : "Un "mot" important" → incorrect Après : "Un ""mot"" important" → correct Tests: - Création des factories `StatutEvenementFactory`, `ContexteFactory`, et `SiteInspectionFactory` - Mise à jour des factories existantes avec les nouveaux champs et relations `statut_evenement`, `contexte`, et `site_inspection`. - Ajustement du nombre de requêtes attendues dans les tests de performance pour prendre en compte les nouveaux champs et relations dans les factories
- Loading branch information
Showing
4 changed files
with
385 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.