I am using django-reversion. How can I print all revisions in every model in a ListView?
I've tried
class RevisionListView(ListView):
model = reversion.revisions.Version
template_name = "revision_list.html"
and printing the queryset in my template with
{% for version in version_list %}
{{ version }}
{% endfor %}
It seems to work but I don't know how to get the link to the 'original object' (through get_absolute_url
). It seems that I get object_id and content_type but I don't know how to get the object's absolute url defined in models.py
.
Can I print the number of revision and what number the specific revision is among the revision for the specific object?
I've searched through SO as I thought others have had the same problem but I cannot find anything.