jedie / django-reversion-compare

Add compare view to django-reversion for comparing two versions of a reversion model.

Home Page:https://pypi.org/project/django-reversion-compare/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comparing booleans is awkward

LegoStormtroopr opened this issue · comments

When comparing a boolean field that goes from True and False, sometimes it gives results like that below:

image

I'm having a look at how this could be improved.

I think this is due to google-diff-match-patch being overly helpful. Fortunately, its just a function in amix-in to fix this.

Looks better than the current version....

Please create a pull request to merge.

maybe also a good idea is something like this:
<del>{{ bool1 }}</del> changed to <ins>{{ bool2 }}</ins>

Done, I've added translation fields for it too!

I just made <del>{{ bool1 }}</del> changed to <ins>{{ bool2 }}</ins> too.

Wait a moment i will commit soon.

done: e535267

Please rebase ;)

Hmmm, one of the tests is changed to compare None to False in a NullBooleanField, which is showing no change. I'll see what I can do to fix this