1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Removed usage of 'object' variable name in docs.

This commit is contained in:
Harry Moreno
2018-07-06 12:44:04 -04:00
committed by Tim Graham
parent 66b6b68923
commit 6e55cf0de6
2 changed files with 10 additions and 12 deletions

View File

@@ -418,13 +418,11 @@ object -- so we simply override it and wrap the call::
queryset = Author.objects.all()
def get_object(self):
# Call the superclass
object = super().get_object()
obj = super().get_object()
# Record the last accessed date
object.last_accessed = timezone.now()
object.save()
# Return the object
return object
obj.last_accessed = timezone.now()
obj.save()
return obj
.. note::