根据以下说明/说明,该服务器是我今天设置的虚拟Ubuntu计算机(在与本教程不同的地方进行了说明):
那让Django“成功了!” 页面在本地网络上的服务器地址上。然后,我按照官方网站上的说明进行操作(我不能发布太多链接,我的信誉太低了),当我尝试执行./manage.py syncdb时,出现以下错误:
CommandError: One or more models did not validate:
zinnia.entry: 'sites' has an m2m relation with model <class 'django.contrib.sites.models.Site'>, which has either not been installed or is abstract.
Run Code Online (Sandbox Code Playgroud)
Zinnia网址(/ weblog /和/ comments /)产生404错误,指示该Zinnia网址(绝对在项目的urls.py中)没有从 urls.py 中删除。我怀疑syncdb错误与此有关:
Using the URLconf defined in homepage.urls, Django tried these URL patterns, in this order:
^admin/
The current URL, weblog/, didn't match any of these.
Run Code Online (Sandbox Code Playgroud)
明确地说,从运行中的Django服务器开始,我根据指示进行了以下操作(我在重申我已采取的步骤,以便完全清楚):
我还对项目目录中没有可编辑的python代码这一事实感到困惑-Zinnia是否完全像黑匣子一样运行?哦,我还确保所有要求都已安装,并且粘贴了requirements.txt,但该网站认为它是代码,不允许我发布。无论如何,Zinnia安装页面上列出的所有内容都在其中。