How can I register model created by django-simple-history on admin site?

243 Views Asked by At

So, I got a model Question that has a history saved in the model HistoricalQuestion by the django-simple-history package, how do I register it to django admin site?

Other model registering is straightforward

admin.site.register(models.Event)

But I am not sure how to get it for that package models.

1

There are 1 best solutions below

0
Shamsudeen McHalwai On BEST ANSWER

The solution was actually quite simple actually. All I had to do was"

admin.site.register(models.Question.history.model)

Where Question is my model name.