Django reversion recovery from a web page

118 Views Asked by At

Is it any chance to implement recovery of the deleted model objects by django-reversion from a site web page or it works only from admin panel? I dont wait for ready solution, rather i need to know if it possible or not or maybe some advice where i need to dig to find information about how to do it.

Sorry for the broad question.

Thanks.

1

There are 1 best solutions below

1
Aleksei Khatkevich On BEST ANSWER

Yes, it is possible by fullfiling following code in the view;

versions = Version.objects.get_for_model(NameofYourmodel).filter(object_id=someid) 
versions[0].revision.revert()