我在夹层中有两个免费主题 - solid & moderna
取自 - HERE。
我只想运行HOST_THEMES
的{{1}}功能。所以我继续加载我的mezzanine
这两个主题 -
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
如果我没有用端口设置我的主机,则相等失败。
我究竟做错了什么?
答案 0 :(得分:0)
嘿伙计我能通过以下方式解决这个问题 -
1.在Hosts
/etc/hosts
制作两个自定义主机并将它们绑定到我的IP并且它有效
我不知道为什么这不适用于localhost
或127.0.0.1