apis_core.history.views#
Module Contents#
Classes#
This view lists the historical data of one object. The GenericModel this view acts upon is NOT the historical model, but the base model. I.e. it is not the VersionPerson, but the Person. Therefore the permission required to access this view refers to the Person model, NOT the VersionPerson model! |
|
This view allows to reset a model instance to an earlier version. The GenericModel this view acts upon IS the historical model, so the permission required to access the view refers to the versioned model. For example for the Person model, this view acts upon the VersionPerson model and therefore the permission required is the .versionperson_view permission. |
API#
- class apis_core.history.views.HistoryView(**kwargs)#
Bases:
apis_core.generic.views.GenericModelMixin,apis_core.generic.views.GenericModelPermissionRequiredMixin,django_tables2.SingleTableMixin,django.views.generic.detail.DetailViewThis view lists the historical data of one object. The GenericModel this view acts upon is NOT the historical model, but the base model. I.e. it is not the VersionPerson, but the Person. Therefore the permission required to access this view refers to the Person model, NOT the VersionPerson model!
Initialization
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'history/history.html'#
- permission_action_required = 'view'#
- get_table_class()#
- get_table_data()#
- class apis_core.history.views.HistoryReset(**kwargs)#
Bases:
apis_core.generic.views.GenericModelMixin,apis_core.generic.views.GenericModelPermissionRequiredMixin,django.views.generic.detail.BaseDetailView,django.views.generic.edit.FormViewThis view allows to reset a model instance to an earlier version. The GenericModel this view acts upon IS the historical model, so the permission required to access the view refers to the versioned model. For example for the Person model, this view acts upon the VersionPerson model and therefore the permission required is the .versionperson_view permission.
Initialization
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- form_class = None#
- template_name = 'history/reset.html'#
- permission_action_required = 'change'#
- form_valid(form)#
- get_success_url()#