2017-10-31 12 views
1

私はsettings.INSTALLED_APPSからメザニンmezzanine.accountsをコメントしてAUTHENTICATION_BACKENDメアラニンをallauthと一緒に使うには?

settings.pyとしてallauth使用
AUTHENTICATION_BACKENDS = (
    "django.contrib.auth.backends.ModelBackend", 
    "allauth.account.auth_backends.AuthenticationBackend" 
) 
urls.py:
urlpatterns += [ 
    url(r"^$", include("movies.urls")), 
    url("^blog2", blog_post_list, name="home"), 
    url(r"^admin/", include(admin.site.urls)), 
    url(r"^movies/", include("movies.urls", namespace="movies")), 
    url(r"^faq/", include("fack.urls")), 
    url(r"^accounts/", include("allauth.urls")), 
    url(r'^captcha/', include('captcha.urls')), 
    url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'), 
    url(r'^tz_detect/', include('tz_detect.urls')), 
    url(r"^h/", include("home2.urls", namespace="home2")), 
    url(r"^profile/", include("profile.urls", namespace="profile")), 
    url("^", include("mezzanine.urls")), 
] 

問題は、私は、https://localhost/blog2に行くとき、私は見ているということですallauth.accountsのbase.html。

おそらく、メザニンはallauth accounts/base.htmlを独自のaccounts/base.htmlと混同していますか?それとも別のものが欠けているかもしれない。

答えて

0

url("^blog2", blog_post_list, name="home"),は、base.htmlを拡張するテンプレートとしてblog/blog_post_list.htmlを使用していますが、blog/appの中にbase.htmlがないので、これは最初のものを使用しました。

I.e. <project_path>/templates/base.htmlにbase.htmlを作成します。 mezzanine/core/templates/base.htmlをテンプレートとして解決します

関連する問題