From 12606d2b99dbfe7d0a8f51818e81a29ea2472943 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 18 Apr 2016 09:02:56 -0400 Subject: [PATCH] [1.9.x] Fixed #26514 -- Documented that User.refresh_from_db() doesn't clear the permission cache. Backport of 2c4c67af94318b15df7d9d37b936e07e8168bc73 from master --- docs/topics/auth/default.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index 9f804de464..2bfefe5c25 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -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