mirror of
https://github.com/django/django.git
synced 2025-07-19 09:09:13 +00:00
[1.9.x] Fixed #26514 -- Documented that User.refresh_from_db() doesn't clear the permission cache.
Backport of 2c4c67af94318b15df7d9d37b936e07e8168bc73 from master
This commit is contained in:
parent
7df7039df1
commit
12606d2b99
@ -285,6 +285,7 @@ the ``User`` from the database. For example::
|
||||
user.has_perm('myapp.change_bar') # False
|
||||
|
||||
# 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)
|
||||
|
||||
# Permission cache is repopulated from the database
|
||||
|
Loading…
x
Reference in New Issue
Block a user