第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Django項(xiàng)目運(yùn)行報(bào)錯(cuò)Apps aren't loaded yet

Django項(xiàng)目運(yùn)行報(bào)錯(cuò)Apps aren't loaded yet

慕容3067478 2019-02-17 06:13:36
我?guī)缀醪楸榱司W(wǎng)上所有有關(guān)這個(gè)報(bào)錯(cuò)的解決辦法,全部都不行。求老哥們幫幫我,我真的要瘋了。 下面是詳細(xì)報(bào)錯(cuò)信息: Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000000004C5AD90> Traceback (most recent call last): File "E:\MyProgram\Anaconda\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs) File "E:\MyProgram\Anaconda\lib\site-packages\django\core\management\commands\runserver.py", line 113, in inner_run autoreload.raise_last_exception() File "E:\MyProgram\Anaconda\lib\site-packages\django\utils\autoreload.py", line 248, in raise_last_exception raise _exception[1] File "E:\MyProgram\Anaconda\lib\site-packages\django\core\management\__init__.py", line 327, in execute autoreload.check_errors(django.setup)() File "E:\MyProgram\Anaconda\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs) File "E:\MyProgram\Anaconda\lib\site-packages\django\__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "E:\MyProgram\Anaconda\lib\site-packages\django\apps\registry.py", line 89, in populate app_config = AppConfig.create(entry) File "E:\MyProgram\Anaconda\lib\site-packages\django\apps\config.py", line 90, in create module = import_module(entry) File "E:\MyProgram\Anaconda\lib\importlib\__init__.py", 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 941, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed 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 "E:\MyProgram\Anaconda\lib\site-packages\django\contrib\admin\models.py", line 5, in <module> from django.contrib.contenttypes.models import ContentType File "E:\MyProgram\Anaconda\lib\site-packages\django\contrib\contenttypes\models.py", line 134, in <module> class ContentType(models.Model): File "E:\MyProgram\Anaconda\lib\site-packages\django\db\models\base.py", line 100, in __new__ app_config = apps.get_containing_app_config(module) File "E:\MyProgram\Anaconda\lib\site-packages\django\apps\registry.py", line 244, in get_containing_app_config self.check_apps_ready() File "E:\MyProgram\Anaconda\lib\site-packages\django\apps\registry.py", line 127, in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. 在PyCharm里運(yùn)行這個(gè)Django項(xiàng)目,就是運(yùn)行不了,出上面的錯(cuò)誤。但是我換成我之前寫的別的Django項(xiàng)目都沒問題。 這個(gè)項(xiàng)目本來也是能運(yùn)行的,我引入xadmin就不行了,一直出這個(gè)錯(cuò)。 我在StackOverflow上找到了類似的問題:https://stackoverflow.com/que... 但是我還是不清楚該怎么修正這個(gè)問題。 我的Django版本是2.0,下面是我的settings: """ Django settings for MxShop_Back project. Generated by 'django-admin startproject' using Django 2.1. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os import sys # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # 設(shè)置搜索app的路徑 sys.path.insert(0, BASE_DIR) sys.path.insert(0, os.path.join(BASE_DIR, "apps")) sys.path.insert(0, os.path.join(BASE_DIR, "extra_apps")) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '77@0n19n67bs_8e-n6g%s&nfu(wl5h4-^pqadi9a+bf3e*!u@a' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # 替換Django默認(rèn)的用戶模型 AUTH_USER_MODEL = 'users.UserProfile' # Application definition INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'DjangoUeditor', 'users.apps.UsersConfig', 'goods.apps.GoodsConfig', 'trade.apps.TradeConfig', 'user_operations.apps.UserOperationsConfig', 'crispy_forms', 'xadmin', 'django.contrib.admin.models.LogEntry', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'MxShop_Back.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')] , 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'MxShop_Back.wsgi.application' # Database # https://docs.djangoproject.com/en/2.1/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mxshop', 'USER': 'root', 'PASSWORD': '3838438', 'HOST': '127.0.0.1', 'OPTIONS': {'init_command': 'SET default_storage_engine=INNODB;'} } } # Password validation # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/2.1/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.1/howto/static-files/ STATIC_URL = '/static/'
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 4896 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)