Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python main.py 出错 #15

Open
FengJun1206 opened this issue Aug 16, 2020 · 1 comment
Open

python main.py 出错 #15

FengJun1206 opened this issue Aug 16, 2020 · 1 comment

Comments

@FengJun1206
Copy link

python main.py 运行出错:

/home/hj/Projects/imoocc/apps/detail/models.py:7: RemovedInDjango19Warning: Model class apps.detail.models.ConnectionInfo doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
  class ConnectionInfo(models.Model):

Traceback (most recent call last):
  File "main.py", line 21, in <module>
    from scanhosts.util.nmap_all_server import NmapNet
  File "/home/hj/Projects/imoocc/scanhosts/util/nmap_all_server.py", line 23, in <module>
    from apps.detail.models import ConnectionInfo, VirtualServerInfo, PhysicalServerInfo, NetConnectionInfo, NetWorkInfo
  File "/home/hj/Projects/imoocc/apps/detail/models.py", line 7, in <module>
    class ConnectionInfo(models.Model):
  File "/root/.virtualenvs/imooc/lib/python2.7/site-packages/django/db/models/base.py", line 309, in __new__
    new_class._meta.apps.register_model(new_class._meta.app_label, new_class)
  File "/root/.virtualenvs/imooc/lib/python2.7/site-packages/django/apps/registry.py", line 221, in register_model
    (model_name, app_label, app_models[model_name], model))
RuntimeError: Conflicting 'connectioninfo' models in application 'detail': <class 'detail.models.ConnectionInfo'> and <class 'apps.detail.models.ConnectionInfo'>.
@amsmoking
Copy link

启动项目是运行
python3 manager.py runserver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants