在Heroku上部署django应用程序时出错

时间:2018-12-26 23:10:04

标签: django heroku deployment

当我运行命令:heroku run python manage.py migrate时,出现以下错误:

/app/.heroku/python/lib/python3.7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.""")
Traceback (most recent call last):

File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/base.py", line 350, in execute
self.check()
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/base.py", line 379, in check
include_deployment_checks=include_deployment_checks,
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/commands/migrate.py", line 60, in _run_checks
issues.extend(super()._run_checks(**kwargs))
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/base.py", line 366, in _run_checks
return checks.run_checks(**kwargs)
....
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/app/foodtasker/urls.py", line 15, in <module>
url(r'^restaurant/sign-in/$', auth_views.loginView.as_view(template_name='restaurant/sign_in.html'),name="restaurant-sign-in"),
AttributeError: module 'django.contrib.auth.views' has no attribute 'loginView'

我无法弄清此错误的根源,我想解决它,以便可以在Heroku上部署我的应用。

0 个答案:

没有答案