heroku现在支持静态文件吗?

时间:2013-09-09 19:37:52

标签: django heroku

这是一个基本问题。前几天我在youtube上观看了一个关于将django应用程序部署到heroku的视频。在该视频中,他们通过亚马逊网络服务获取静态文件。当我今天在heroku上部署django时,我的所有静态文件都正常工作。我在这里错过了什么吗?

2 个答案:

答案 0 :(得分:1)

是的,他们现在有一份文件:https://devcenter.heroku.com/articles/django-assets

答案 1 :(得分:0)

将index.html重命名为home.html。 使用以下代码创建index.php文件:

<?php include_once("home.html"); ?>

现在转到CMD(或Bash)中的app文件夹,然后使用以下代码将代码提交给Heroku:

git add .
git commit -m 'Change this to a meaningful description'
git push heroku master

Source

相关问题