Django2.1遇到 app_label and isn't in an application in INSTALLED_APPS 错误




Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7efe941f08c8>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/utils/", line 225, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/core/management/commands/", line 111, in inner_run
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/utils/", line 248, in raise_last_exception
    raise _exception[1]
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/core/management/", line 329, in execute
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/utils/", line 225, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/", line 24, in setup
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/apps/", line 120, in populate
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/contrib/admin/", line 23, in ready
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/contrib/admin/", line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/utils/", line 47, in autodiscover_modules
    import_module('%s.%s' % (, module_to_search))
  File "/usr/local/lib/python3.6/importlib/", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/py/super/news_web/", line 7, in <module>
    from fluent_contents.admin import PlaceholderFieldAdmin
  File "/usr/local/lib/python3.6/site-packages/fluent_contents/admin/", line 14, in <module>
    from fluent_contents.admin.placeholdereditor import PlaceholderEditorAdmin, PlaceholderEditorInline, PlaceholderEditorBaseMixin
  File "/usr/local/lib/python3.6/site-packages/fluent_contents/admin/", line 14, in <module>
    from fluent_contents import extensions
  File "/usr/local/lib/python3.6/site-packages/fluent_contents/extensions/", line 12, in <module>
    from .pluginbase import PluginContext, ContentPlugin, HttpRedirectRequest
  File "/usr/local/lib/python3.6/site-packages/fluent_contents/extensions/", line 13, in <module>
    from django.contrib.sites.models import Site
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/contrib/sites/", line 80, in <module>
    class Site(models.Model):
  File "/usr/local/lib/python3.6/site-packages/Django-2.1-py3.6.egg/django/db/models/", line 99, in __new__
    "INSTALLED_APPS." % (module, name)
RuntimeError: Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

将不用的app注释掉也没有起到作用,上网查解决方案。找了半天在Stack Overflow上找找到一篇答案,解决方法如下:



stack overflow链接地址

What Isn't in Palm OS Cobalt... Yet

02-14 Ed Hardy | Editor-in-ChiefrnFeb 10, 2004rnAt the PalmSource conference today, company executives have been talking about all the new features in Palm OS Cobalt. However, there are some significant features that didn't make it into this version. Still, PalmSource says these will be in a future version rnrnUser Interface (UI)rnThe look and feel of the Palm OS has changed very little since its earliest days. Though many are accustomed to the way the user interface works, one of the most popular categories of Palm applications is Launcher replacements, which shows that there's room for improvement. rnrn However, the UI in Palm OS Cobalt remains almost unchanged from the previous versions (see picture at left). About the only difference is the inclusion of the Task Bar, though several handhelds already use versions of this. rnrnStill, Larry Slotnick from PalmSource said this morning that his company intends to change the look and feel in the next version of Cobalt. He didn't give any details of what the differences will be. Still, the changes made to the new version of the Address Book might be a clue of the direction PalmSource is going. It uses a series of tabs across the top of the screen to show various screens of information. rnrnFile ManagerrnAnother feature of the Palm OS that hasn't changed Is the fact that there is no file management system in RAM. This means that all files in the handheld's memory exist on the same level, and aren't broken up into groups. rnrnIn addition, the Palm OS severely limits the types of files that can be stored in RAM, though developers have found somewhat kludgy work-arounds for this. rnrnPalmSource's Mr. Slotnick said today this is also on his company's agenda for a future version of Cobalt. While he would't say any more, he did say that the developers don't necessarily think that the familiar paradigm of files in folders is appropriate for handhelds. rnrnApple Macintosh SynchronizationrnThe previous features are ones that aren't yet available in the Palm OS, but will be someday. Macintosh synchronization is something that the Palm OS used to offer, but won't any more. rnrn Mr. Slotnick (see picture at right) made it clear that PalmSource isn't developing a Mac version of the Palm Desktop. As the way the PIM apps work has changed significantly, this means Mac users won't be able to HotSync without third-party software. rnrnFortunately, a third party has already stepped forward. Mark/Space is going to release a version of its Missing Sync application for Cobalt. This will allow existing Mac conduits for other third-party applications to still work. rnrnIn addition to the standard functions, Missing Sync for Cobalt will allow Bluetooth and Wi-Fi HotSyncing. rnrnMark/Space indicated this application will probably cost about what the current one does now, about $40. However, the company is open to licensing its application to Palm OS licensees who want to add Mac OS X synchronization to their handhelds.rn


  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他