ghickman
ghickman

Reputation: 6043

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

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 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?)

Upvotes: 1

Views: 293

Answers (1)

Thierry Lam
Thierry Lam

Reputation: 46264

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.

Upvotes: 2

Related Questions