简体   繁体   English

同一个 Django App 中的多个域和多个目录

[英]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.我试图在同一个 django 应用程序中支持具有混合多个域和多个目录的相当复杂的体系结构。 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 Carl Meyer最近为您发布了完美的应用程序: 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 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在同一个域上使用 Django 租户,而不是子域或多个域 - Using Django tenants on the same domain, rather than subdomains or multiple domains 设置Apache以使用虚拟主机在同一域上运行多个django应用 - Setting Apache to run multiple django apps on the same domain with virtual hosts 我的Django应用程序必须与项目目录名称相同吗? - Does my Django app have to be the same name as the project directory? 单个域上的多个django实例 - multiple instances of django on a single domain 具有多个域扩展的Django社会注册 - Django socialregistration with multiple domain extensions 如何获得在相同域上运行,共享用户数据库,但具有不同(和隔离)应用程序模型的任意数量的django应用程序? - How to get arbitrary number of django apps running on same domain, sharing User database, but with different (and isolated) app models? 我可以在Django中多次创建同一个应用程序吗? - Can i create the same app multiple times in django? 强制Django在同一应用中识别多个“模型”文件夹? - Force Django to recognize multiple “models” folders in the same app? 如何在Django中创建网站的多个版本,但在相同的域但不同的URL下运行 - How to create multiple versions of a site in django but run under same domain but different url 多个子域的Django多个会话Cookie域 - Django multiple sessions cookie domain for multiple subdomains
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM