开发者

Request.User with custom auth backend

i implemented custom simple auth backend (two methods - authenticate and get_user, nothing special), now i could successfully authenticate and login my customUser, but what should i need to do to have possibility call request.user with my customUser in the views methods? For now it just give me an error 'WSGIRequest' object has no attribute 'user'

UPD. Turns out, i forg开发者_开发技巧ot to add default 'django.contrib.auth.middleware.AuthenticationMiddleware' in settings.py. It worked now

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜