@@ -46,29 +46,29 @@ def history_view(self, request, object_id, extra_context=None):
46
46
pk_name = opts .pk .attname
47
47
history = getattr (model , model ._meta .simple_history_manager_attribute )
48
48
object_id = unquote (object_id )
49
- action_list = history .filter (** {pk_name : object_id })
49
+ historical_records = history .filter (** {pk_name : object_id })
50
50
if not isinstance (history .model .history_user , property ):
51
51
# Only select_related when history_user is a ForeignKey (not a property)
52
- action_list = action_list .select_related ("history_user" )
52
+ historical_records = historical_records .select_related ("history_user" )
53
53
history_list_display = getattr (self , "history_list_display" , [])
54
54
# If no history was found, see whether this object even exists.
55
55
try :
56
56
obj = self .get_queryset (request ).get (** {pk_name : object_id })
57
57
except model .DoesNotExist :
58
58
try :
59
- obj = action_list .latest ("history_date" ).instance
60
- except action_list .model .DoesNotExist :
59
+ obj = historical_records .latest ("history_date" ).instance
60
+ except historical_records .model .DoesNotExist :
61
61
raise http .Http404
62
62
63
63
if not self .has_view_history_or_change_history_permission (request , obj ):
64
64
raise PermissionDenied
65
65
66
- # Set attribute on each action_list entry from admin methods
66
+ # Set attribute on each historical record from admin methods
67
67
for history_list_entry in history_list_display :
68
68
value_for_entry = getattr (self , history_list_entry , None )
69
69
if value_for_entry and callable (value_for_entry ):
70
- for list_entry in action_list :
71
- setattr (list_entry , history_list_entry , value_for_entry (list_entry ))
70
+ for record in historical_records :
71
+ setattr (record , history_list_entry , value_for_entry (record ))
72
72
73
73
content_type = self .content_type_model_cls .objects .get_for_model (
74
74
get_user_model ()
@@ -80,7 +80,7 @@ def history_view(self, request, object_id, extra_context=None):
80
80
)
81
81
context = {
82
82
"title" : self .history_view_title (request , obj ),
83
- "action_list " : action_list ,
83
+ "historical_records " : historical_records ,
84
84
"module_name" : capfirst (force_str (opts .verbose_name_plural )),
85
85
"object" : obj ,
86
86
"root_path" : getattr (self .admin_site , "root_path" , None ),
0 commit comments