This bug that got weird quickly. In a fairly complex django project, I noticed that it's impossible to revert anything registered with django-reversion. The displayed history of changes is accurate (dates and comments on what was changed match reality), but visiting object's /history/rev_number always shows form pre-filled with newest version present.
I confirmed that revisions actually stored in the DB are fine, contain correct data in serialized_data field, and are not identical. Only after rendering history/revision view, the resulting HTML contains newest values.
Then I created a new model in this project, made a few changes, tried reverting them - same bug appeared. There are no admin customizations to this new model. Furthermore, I removed my custom template directories to make sure nothing non-standard affects rendering. Still, bug is there.
Finally, I created a new django project with a single reversion-registered model, made a few changes and tried reverting - the bug still appeared. This is a project made from scratch, having nothing in common with the main one.
In desperation, I removed and re-built a virtualenv with fresh Python installation and installed all the requirements for the main project, and added all dependencies of main project to INSTALLED_APPS of the new one. The bug disappeared for the new project.
- using new virtualenv, new project works normally
- using old virtualenv, both projects show buggy behaviour
- using new virtualenv, main project still shows buggy behaviour
Looks like both something in project configuration and something in virtualenv affect the situation, and at this point I can't figure out how is it possible. Any ideas what am I looking at and how could I better debug the situation?