Django如何部署项目pythonanywhere.com

2024-04-28 12:10:14 发布

您现在位置:Python中文网/ 问答频道 /正文

以下是这篇未回复帖子的问题:
Django Move Project from Windows Host to Linux Host (and Deploy)

我试着遵循这个方法:
https://tutorial.djangogirls.org/de/django_installation/
https://tutorial.djangogirls.org/de/deploy/#registriere-dich-f%C3%BCr-ein-pythonanywhere-konto

所以我把我的代码上传到Github并公开发布,我在这个URL创建了一个pythonanywhere项目:
http://mvanthiel.pythonanywhere.com/catalog/ui/

我还创建了一个虚拟环境并创建了.gitinore文件。你知道吗

在我的Windows(Dev)主机上,网站确实按预期工作。
在pythonanywhere.com它没有。你知道吗

在Windows Dev上,我将Projekt内容推送到git上,就像how-to中解释的那样。
在pythonanywhere.com我安装了pip模块。
pip3.6 install --user pythonanywhere
然后我试着自动配置pythonanywhere.com使用:
pa_autoconfigure_django.py --python=3.6 https://github.com/HigeMynx/onboarding.git

之后,这个网站就可以在线使用了,但和我之前未回复的帖子中描述的完全一样,Django只在Linux机器上缺少模板,我不知道为什么。你知道吗

我可以让你进入我的房间pythonanywhere.com如果需要,可以使用bash,如果需要,可以查看我的git代码。你知道吗

请帮帮我。你知道吗


Tags: todjangohttpsorggitcomhostlinux