heroku运行python manage.py migrate - >没有名为production

时间:2016-10-24 20:51:08

标签: python django heroku migration

我是python / django的新手,需要一些帮助。

目前,我正在编写一本名为hellowebapp的书,并在heroku部署期间遇到了一个问题。当我键入" heroku运行python manage.py migrate"时,我收到此消息:

the screen shot of the error message

Running python manage.py migrate on ⬢ ryujihellowebapp... up, run.4755 (Free)
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 302, in execute
    settings.INSTALLED_APPS
  File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
    self._setup(name)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
    self._wrapped = Settings(settings_module)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/app/.heroku/python/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named production

如何修复最后一部分? :

__import__(name)
ImportError: No module named production

另外,当我输入&#39; heroku open&#39;并在浏览器中打开应用程序,有一条消息显示&#34; Application Error&#34;。一切正常,localhost中没有错误消息,似乎没有问题我将应用程序推送到heroku。一旦我开始研究heroku迁移部分,问题就开始发生了。

谢谢。

0 个答案:

没有答案