【问题标题】:public_schema_urlconfig not getting called using django-tenant-schema没有使用 django-tenant-schema 调用 public_schema_urlconfig
【发布时间】:2016-09-11 10:42:15
【问题描述】:

我是多租户和 django 的新手。对于我的发票项目,我使用的是 django-tenant-schemas。现在,我正在运行租户网站。但是,它不适用于我创建的公共客户端,该公共租户的域是 localhost,即:

domain_url='{{ hostname }}'

我也设置了我的

public_schema_urlconfig = 'invoicesolution.urls_public'

现在,我的 urls_public 文件没有被调用,尽管 urls_tenant 文件被调用,它与前者位于同一文件夹中。

我遇到了什么问题?任何帮助将不胜感激。

PS:我只是将 public_schema_urlconfig 值编辑为随机的东西,看看项目是否中断,但是,它并没有中断。

【问题讨论】:

    标签: python django schema multi-tenant


    【解决方案1】:

    很抱歉回答迟了,但我遇到了完全相同的问题,只是想通了。您需要为您的域创建一个公共租户,然后 url 将起作用。 https://django-tenant-schemas.readthedocs.io/en/latest/use.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-29
      • 2020-06-01
      • 2016-10-21
      • 1970-01-01
      • 1970-01-01
      • 2018-10-08
      • 1970-01-01
      相关资源
      最近更新 更多