Skip to content

Commit c30c382

Browse files
committed
Clean up docstrings
1 parent 5ab0c97 commit c30c382

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

simple_history/middleware.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33

44
class HistoryRequestMiddleware(object):
5-
"""Expose the request as a thread-friendly variable on the
6-
HistoricalRecords class.
5+
"""Expose request to HistoricalRecords.
76
7+
This middleware sets request as a local thread variable, making it
8+
available to the model-level utilities to allow tracking of the
9+
authenticated user making a change.
810
"""
911

1012
def process_request(self, request):

simple_history/models.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,7 @@ def create_historical_record(self, instance, type):
225225
history_user=history_user, **attrs)
226226

227227
def get_history_user(self, instance):
228-
"""Use hints from the instance and middleware to identify the
229-
user making the change.
230-
231-
"""
228+
"""Get the modifying user from instance or middleware."""
232229
try:
233230
return instance._history_user
234231
except AttributeError:

0 commit comments

Comments
 (0)