当我 运行 "python manage.py check" 时出现错误
Getting errors when I run "python manage.py check"
自从我开始工作以来,我一直无法在本地 运行 我的网络应用程序。我已经这样做了一段时间,但仍然无法得到干净的 python manage.py runserver
或 python manage.py check
.
我曾经在这里安装过 Anaconda,这会影响我的路径吗?
这是我遇到的错误。
(venv) BattleStationOnline 10:13:51 aggrigator$~python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/anaconda2/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/anaconda2/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/anaconda2/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/anaconda2/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/anaconda2/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/anaconda2/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/andynguyen/Desktop/aggrigator/aggrigator/accounts/models.py", line 21, in <module>
from simple_history.models import HistoricalRecords
File "/anaconda2/lib/python2.7/site-packages/simple_history/models.py", line 18, in <module>
from django.urls import reverse
ImportError: No module named urls
编辑:我正在 运行ning Django 1.8,我的网络应用 运行 在我的 ubuntu 服务器上没问题。
使用,
from django.core.urlresolvers import reverse
附加信息
django.core.urlresolvers.reverse
Deprecated since version 1.10:
In older versions, these functions are located in django.core.urlresolvers. Importing from the old location will continue to work until Django 2.0.
自从我开始工作以来,我一直无法在本地 运行 我的网络应用程序。我已经这样做了一段时间,但仍然无法得到干净的 python manage.py runserver
或 python manage.py check
.
我曾经在这里安装过 Anaconda,这会影响我的路径吗?
这是我遇到的错误。
(venv) BattleStationOnline 10:13:51 aggrigator$~python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/anaconda2/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/anaconda2/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/anaconda2/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/anaconda2/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/anaconda2/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/anaconda2/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/andynguyen/Desktop/aggrigator/aggrigator/accounts/models.py", line 21, in <module>
from simple_history.models import HistoricalRecords
File "/anaconda2/lib/python2.7/site-packages/simple_history/models.py", line 18, in <module>
from django.urls import reverse
ImportError: No module named urls
编辑:我正在 运行ning Django 1.8,我的网络应用 运行 在我的 ubuntu 服务器上没问题。
使用,
from django.core.urlresolvers import reverse
附加信息
django.core.urlresolvers.reverse
Deprecated since version 1.10: In older versions, these functions are located in django.core.urlresolvers. Importing from the old location will continue to work until Django 2.0.