如何在没有在/ accounts / login url的情况下显示django allauth注册页面? [英] How can I get the django allauth signup page to show up without being at the /accounts/login url?

查看:199
本文介绍了如何在没有在/ accounts / login url的情况下显示django allauth注册页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很多网站,如pinterest,Facebook和tumblr都有他们的主页上的注册页面。是否可以让主页登录页面显示在主页而不是/ accounts / login页面?

A lot of websites such as pinterest, facebook, and tumblr have their signup page at their home page. Is it possible to get the allauth login page to show on the home page rather than the /accounts/login page?

推荐答案

能够!只需路由您要访问allauth登录视图的任何url

Sure can! Just route whichever url you want to go to the allauth login view

from django.conf.urls import patterns, include, url
from main import views
from allauth.account import views as allauthviews

urlpatterns = patterns('',
    url(r'^$', allauthviews.login),
    url(r'^someurl/$', views.home)
)

这篇关于如何在没有在/ accounts / login url的情况下显示django allauth注册页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆