Sfoglia il codice sorgente

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

Tim Graham 9 anni fa
parent
commit
2c4c67af94
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      docs/topics/auth/default.txt

+ 1 - 0
docs/topics/auth/default.txt

@@ -284,6 +284,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