简体   繁体   中英

Multiple Domain and Multi Directory in the same Django App

I am trying to support a quite complex architecture with mixed multiple domains and multiple directory in the same django application. Basically, we'll have urls like this:

http://www.firstdomains.com/(DJANGO_APP)
http://www.firstdomains.com/de/(DJANGO_APP)
http://www.other.com/esp/best/(DJANGO_APP)
http://www.complex.com/it/(DJANGO_APP)
http://www.last.com/(DJANGO_APP)
.... (lot more)

The "combo" domain/directory will determine a theme website and a language. What do you think is the best way to implement this?

You are in luck! Carl Meyer recently released the perfect app for you: django-hosts

If for some reason the URL parts don't work for you try also adding one of the apps that do URL i18n/l10n such as http://pypi.python.org/pypi/transurlvania

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM