我正在尝试在 Heroku 上部署我的 Django 应用程序,我正在按照教程进行操作,但是当我去尝试打开网站时:
heroku open
我收到错误:
Request URL: http://nameless-dawn-7713.herokuapp.com/
Using the URLconf defined in crunchWeb.urls, Django tried these URL patterns, in this order:
^crunchApp/results$
^crunchApp/contact$
^admin/
The current URL, , didn't match any of these.
即使在运行“heroku open”之前,我的 URLs.py 文件看起来像这样(已保存):
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('crunchApp.views',
url(r'^crunchApp/results$', 'results'),
url(r'^http://nameless-dawn-7713.herokuapp.com/$', 'contact'),
url(r'^crunchApp/contact$', 'contact'),
url(r'^admin/', include(admin.site.urls)),
)
我想我可能必须在命令之前更改 urls.py:
git commit -m "my django app"
但在命令之前我不知道它需要的 URL:
heroku create
有什么想法吗?