From be6e7ff6ebda7acca71e32c2e7890c62e98ba81a Mon Sep 17 00:00:00 2001 From: zhongqi Date: Sat, 11 May 2013 15:53:54 +0800 Subject: [PATCH] [1.5.x] Fixed #20394 - Clarified argument of get_user in docs Backport of 1172bef998 from master. --- docs/topics/auth/customizing.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index d9c6df145a..2aa01b3ab9 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -89,7 +89,8 @@ An authentication backend is a class that implements two required methods: optional permission related :ref:`authorization methods `. The ``get_user`` method takes a ``user_id`` -- which could be a username, -database ID or whatever -- and returns a ``User`` object. +database ID or whatever, but has to be the primary key of your ``User`` object +-- and returns a ``User`` object. The ``authenticate`` method takes credentials as keyword arguments. Most of the time, it'll just look like this::