zoukankan      html  css  js  c++  java
  • Django错误笔记1

    错误联系,

    之前使用pycharm写的Django的时候,每当我更改玩setting的设置后,会出现错误如下,

    /usr/bin/python /home/peggy/PycharmProjects/DDjango/NewRec/manage.py runserver 8000
    Traceback (most recent call last):
    File "/home/peggy/PycharmProjects/DDjango/NewRec/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
    File "/usr/local/lib/python2.7/dist-packages/Django-1.7.3-py2.7.egg/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
    File "/usr/local/lib/python2.7/dist-packages/Django-1.7.3-py2.7.egg/django/core/management/__init__.py", line 354, in execute
    django.setup()
    File "/usr/local/lib/python2.7/dist-packages/Django-1.7.3-py2.7.egg/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
    File "/usr/local/lib/python2.7/dist-packages/Django-1.7.3-py2.7.egg/django/apps/registry.py", line 89, in populate
    "duplicates: %s" % app_config.label)
    django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: admin

    解决方法

    django内部已经包含一个 admin 的应用,你新建的app和系统的重名了,换个名字就好了。
    发现在INSTALLED_APPS里面有两个admin,删掉一个可以了
  • 相关阅读:
    How Many Answers Are Wrong
    Agri-Net —poj1258
    食物链
    A Bug's Life
    畅通工程
    Shortest path of the king
    Alex and Number
    KMP
    快速幂
    0x04
  • 原文地址:https://www.cnblogs.com/zzblee/p/4259272.html
Copyright © 2011-2022 走看看