Kaydet (Commit) 2c4c67af authored tarafından Tim Graham's avatar Tim Graham

Fixed #26514 -- Documented that User.refresh_from_db() doesn't clear the permission cache.

üst 7ba7d203
...@@ -284,6 +284,7 @@ the ``User`` from the database. For example:: ...@@ -284,6 +284,7 @@ the ``User`` from the database. For example::
user.has_perm('myapp.change_bar') # False user.has_perm('myapp.change_bar') # False
# Request new instance of User # Request new instance of User
# Be aware that user.refresh_from_db() won't clear the cache.
user = get_object_or_404(User, pk=user_id) user = get_object_or_404(User, pk=user_id)
# Permission cache is repopulated from the database # Permission cache is repopulated from the database
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment