-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(Structures): historique de modification grâce à django-simple-history #1255
Conversation
8dea59e
to
c14acf4
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.
LG !
Belle trouvaille ce module, bien joué !
Par contre, ça risque de générer beaucoup de données, à surveiller.
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.
LGTM
lemarche/siaes/tests.py
Outdated
def test_history_object_on_create(self): | ||
self.assertEqual(self.siae_1.history.count(), 1) | ||
siae_1_create_history_item = self.siae_1.history.last() | ||
self.assertEqual(siae_1_create_history_item.history_type, "+") |
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.
Peut être ajouter des variables de class pour que ça puisse être réutilisé dans les autres tests et que ça soit mieux compris que c'est "l'ajout"
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.
yes bonne idée j'ai basculé dans constants : 55f232d
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.
à terme je pense qu'on aura un utils/history.py
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.
edit : en fait j'ai créé et basculé dans utils/history.py
c'est mieux : e0caf49
Quoi ?
Ajout du packet django-simple-history
Siae.history
Script
Reste à faire