1
在夾層中,您可以使用兩個不同的URL,具體取決於您想要顯示的內容。有沒有辦法檢查裏面的urls.py,如果活動域位於子域或只是「常規」域?取決於Django中的域的不同的URL配置
這是兩種不同的風格:
url('^$', direct_to_template, {'template': 'index.html'}, name='home'),
url('^$', mezzanine.blog.views.blog_post_list, name='home'),
我還沒有找到這個堅實的路要走。如果我位於子域(通配符/例如sub.example.com)和index.html,並且位於「主」域(例如example.com)上,我想顯示blog_post_list