Multiple Domain and Multi Directory in the same Django App

孤人 提交于 2019-12-10 19:23:10

问题


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 ?


回答1:


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



来源:https://stackoverflow.com/questions/6251428/multiple-domain-and-multi-directory-in-the-same-django-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!