mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-06-18 07:13:29 +00:00
Refactored versioning.py (and associated templates) to improve readability and testability.
Takes inspiration from, but does not use, django-reversion-compare. We do a lot of RIGS-specific stuff that requires a lot of hacking to get working nicely with django-reversion-compare. The main example of this is event-item “many-to-one” fields. The performance difference of my code compared to django-reversion-compare was found to be negligible.
This commit is contained in:
@@ -33,13 +33,13 @@
|
||||
{% endif %}
|
||||
<p>
|
||||
<small>
|
||||
{% if version.old == None %}
|
||||
{% if version.changes.old == None %}
|
||||
Created
|
||||
{% else %}
|
||||
Changed {% include 'RIGS/version_changes.html' %} in
|
||||
{% endif %}
|
||||
|
||||
{% include 'RIGS/object_button.html' with object=version.new %}
|
||||
{% include 'RIGS/object_button.html' with object=version.changes.new %}
|
||||
{% if version.revision.comment %}
|
||||
({{ version.revision.comment }})
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user