We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46fe5f1 commit dc672e1Copy full SHA for dc672e1
docs/advanced.rst
@@ -391,9 +391,8 @@ source model. This is possible by combining the ``bases`` functionality with the
391
392
# define your signal handler/callback anywhere outside of models.py
393
def add_history_ip_address(sender, **kwargs):
394
- instance = kwargs['instance']
395
history_instance = kwargs['history_instance']
396
- history_instance.ip_address = instance.request.META['REMOTE_ADDR']
+ history_instance.ip_address = history_instance.request.META['REMOTE_ADDR']
397
398
399
.. code-block:: python
0 commit comments