How to parse the queryset from the django-simple-history to a html table with columns: history_id, history_date and etc. I'm inherit DetailView class
Example form django-simple-history:
from django.db import models
from simple_history.models import HistoricalRecords
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
history = HistoricalRecords()
class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)
history = HistoricalRecords()
now you can access history by:
all_history = poll.history.all()
more info :