开发者

How to use Django's flatpages with multiple sites and the same url?

开发者 https://www.devze.com 2023-02-16 19:47 出处:网络
I have 5 sites, each on their own domain, running under one django project. Currently all the sites have the same contact page, as provided by flatpages under the url /contact/. However it would be fa

I have 5 sites, each on their own domain, running under one django project. Currently all the sites have the same contact page, as provided by flatpages under the url /contact/. However it would be far nicer to create开发者_如何学Go a contact page for each site, using the same url on each domain.

How can I achieve this with django's flatpages? (or should I look at something else?)


For 5 distinct contact pages, you might need 5 different flatpages entries:

URL          Sites      Content
/contact/    Site #1    Unique contact page for Site #1
/contact/    Site #2    Unique contact page for Site #2
/contact/    Site #3    Unique contact page for Site #3
/contact/    Site #4    Unique contact page for Site #4
/contact/    Site #5    Unique contact page for Site #5

I guess you could also bypass flatpage and have one view with 5 different templates.

0

精彩评论

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