为什么模板路径不同,夹层渲染的内容也不同?

Why template path is different and rendered content is different in mezzanine?

我在夹层有两个免费主题 - solid & moderna 取自 - HERE.

我只想 运行 mezzanineHOST_THEMES 功能。所以我继续将这两个主题加载到我的 INSTALLED_APPS 中,就像这样 -

INSTALLED_APPS = (
    "moderna",
    "solid",
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.redirects",
    "django.contrib.sessions",
    "django.contrib.sites",
    "django.contrib.sitemaps",
    "django.contrib.staticfiles",
    "mezzanine.boot",
    "mezzanine.conf",
    "mezzanine.core",
    "mezzanine.generic",
    "mezzanine.pages",
    "mezzanine.blog",
    "mezzanine.forms",
    "mezzanine.galleries",
    "mezzanine.twitter",
    'mezzanine_api',
    'rest_framework',
    'rest_framework_swagger',
    'oauth2_provider',
    # "mezzanine.accounts",
    # "mezzanine.mobile",
)

在我配置我的代码并在 0.0.0.0:8000 上 运行 之后。然后我在我的 HOST_THEMES 设置中做了两个主机,像这样

HOST_THEMES = [("localhost:8000", "solid"),
               ("192.168.1.130:8000", "moderna")]

每个人都想知道为什么我的主机中的 :8000 是因为代码中的这一行 - Line 25

if host.lower() == domain.lower():

如果我没有为我的主机设置端口,则相等性失败。

因此,在此之后,我将逐步调试正在使用哪些模板。

并且模板目录也选择正确:

我到底做错了什么?

嘿伙计们,我能够通过 - 1. 在 /etc/hosts

中自定义 Hosts

制作了两个自定义主机并将它们绑定到我的 IP,瞧,它成功了

我不知道为什么这不适用于 localhost127.0.0.1