Merge pull request #674 from ryanrdetzel/master

Fix for example in authentication.html
This commit is contained in:
Tom Christie 2013-02-25 05:41:38 -08:00
commit 42aaa9cc68

View File

@ -202,7 +202,7 @@ If the `.authenticate_header()` method is not overridden, the authentication sch
The following example will authenticate any incoming request as the user given by the username in a custom request header named 'X_USERNAME'.
class ExampleAuthentication(authentication.BaseAuthentication):
def has_permission(self, request, view, obj=None):
def authenticate(self, request):
username = request.META.get('X_USERNAME')
if not username:
return None