开发者

Django + socialauth: login with openid or admin

开发者 https://www.devze.com 2023-01-12 02:25 出处:网络
i\'m trying to implement the socialauth module to my django project, but i get a bit c开发者_开发技巧onfused on its relation toward the admin site.

i'm trying to implement the socialauth module to my django project, but i get a bit c开发者_开发技巧onfused on its relation toward the admin site.

My problem: the @login_required decorator redirects me to the admin login page instead of the accounts/login/ page to log in via openid.

  • how do i offer the possibility to the user to log in via admin or openid?

thanks


the solution:

  • in settings.py, change LOGIN_URL = 'admin' to LOGIN_URL = '/accounts/login/'
  • in urls.py add (r'^accounts/', include('socialauth.urls')),
0

精彩评论

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