2016-09-20 8 views
0

Ich habe ein Problem, seit ich mein Django von 1.7.10 auf 1.10.1 aktualisiert. In der Tat hatte ich die django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. Fehler und um das zu lösen, fand ich heraus, dass ich django.setup() entfernen musste, um die zirkuläre Abhängigkeit zu lösen (ich nehme an). Aber dann bin vor, ich den Fehler aus dem Titel:Django 1.10 AppRegistryNotReady: Apps sind noch nicht geladen. Ich kann nicht verwenden django.setup

`` `

Traceback (most recent call last): 
    File "/var/www/webapps/lib/python3.4/site-packages/django/utils/autoreload.py", line 226, in wrapper 
    fn(*args, **kwargs) 
    File "/var/www/webapps/lib/python3.4/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run 
    autoreload.raise_last_exception() 
    File "/var/www/webapps/lib/python3.4/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception 
    six.reraise(*_exception) 
    File "/var/www/webapps/lib/python3.4/site-packages/django/utils/six.py", line 685, in reraise 
    raise value.with_traceback(tb) 
    File "/var/www/webapps/lib/python3.4/site-packages/django/utils/autoreload.py", line 226, in wrapper 
    fn(*args, **kwargs) 
    File "/var/www/webapps/lib/python3.4/site-packages/django/__init__.py", line 27, in setup 
    apps.populate(settings.INSTALLED_APPS) 
    File "/var/www/webapps/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate 
    app_config = AppConfig.create(entry) 
    File "/var/www/webapps/lib/python3.4/site-packages/django/apps/config.py", line 90, in create 
    module = import_module(entry) 
    File "/var/www/webapps/lib/python3.4/importlib/__init__.py", line 109, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 2231, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 2214, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 2203, in _find_and_load_unlocked 
    File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked 
    File "<frozen importlib._bootstrap>", line 1129, in _exec 
    File "<frozen importlib._bootstrap>", line 1448, in exec_module 
    File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed 
    File "/var/www/webapps/lib/python3.4/site-packages/easy_select2/__init__.py", line 7, in <module> 
    from easy_select2.utils import (
    File "/var/www/webapps/lib/python3.4/site-packages/easy_select2/utils.py", line 7, in <module> 
    from easy_select2.widgets import Select2Mixin, Select2, Select2Multiple 
    File "/var/www/webapps/lib/python3.4/site-packages/easy_select2/widgets.py", line 24, in <module> 
    static('easy_select2/js/init.js'), 
    File "/var/www/webapps/lib/python3.4/site-packages/django/templatetags/static.py", line 163, in static 
    return StaticNode.handle_simple(path) 
    File "/var/www/webapps/lib/python3.4/site-packages/django/templatetags/static.py", line 112, in handle_simple 
    if apps.is_installed('django.contrib.staticfiles'): 
    File "/var/www/webapps/lib/python3.4/site-packages/django/apps/registry.py", line 225, in is_installed 
    self.check_apps_ready() 
    File "/var/www/webapps/lib/python3.4/site-packages/django/apps/registry.py", line 124, in check_apps_ready 
    raise AppRegistryNotReady("Apps aren't loaded yet.") 
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. 

und die "Apps Registrierungen":

# APP CONFIGURATION 
    DJANGO_APPS = (
     # Default Django apps: 
     'django.contrib.auth', 
     'django.contrib.contenttypes', 
     'django.contrib.sessions', 
     'django.contrib.sites', 
     'django.contrib.sitemaps', 
     'django.contrib.staticfiles', 
     'django.contrib.messages', 
     # Useful template tags: 
     # 'django.contrib.humanize', 
    ) 

    THIRD_PARTY_APPS = (
     # Admin 
     'djangocms_admin_style', 
     'djangocms_text_ckeditor', 
     'django.contrib.admin', 

     # Django CMS 
     'cms', 
     'menus', 
     'sekizai', 
     'treebeard', 

     'easy_thumbnails', 
     'easy_thumbnails.optimize', 
     'filer', 
     'rosetta', 
     'cmsplugin_filer_file', 
     'cmsplugin_filer_folder', 
     'cmsplugin_filer_link', 
     'cmsplugin_filer_image', 
     'cmsplugin_filer_teaser', 
     'cmsplugin_filer_video', 
     #'cmsplugin_filer_svg', 
     # 'djangocms_ckeditor_filer', 
     'djangocms_style', 
     'djangocms_flash', 
     'djangocms_googlemap', 
     'djangocms_inherit', 

     'reversion', 
     'aldryn_reversion', 
     'parler', 
     'taggit', 
     'meta', 
     'meta_mixin', 
     'cities_light', 
     'admin_enhancer', 
     'multiselectfield',# multiselect in charfield 
     'sortedm2m',# ordered manyTomany 
     'easy_select2', 
     'taggit_autosuggest_select2', 
     'adminsortable2', 
     'autocomplete_light', 
     'compressor', 
     'nocaptcha_recaptcha', 
     'widget_tweaks', 
     'qartez', 
     'django_mobile', 
     'cookielaw', 
     'django_user_agents', 
    ) 

    # Apps specific for this project go here. 
    LOCAL_APPS = (
     'blippar', 
     'multisite_multilanguage', 
     'djangocms_extend', 
     'djangocms_blog', 
     'djangocms_showroom', 
     'djangocms_press', 
     'djangocms_partner_profile', 
     'djangocms_faq', 
     'djangocms_presentations', 
     'djangocms_projects', 

     # plugins 
     'blippbutton', 
     'blippvideo', 
     'djangocms_column', 
     'djangocms_footer', 
     'djangocms_office', 
     'djangocms_contact', 
     'djangocms_partner', 
     'djangocms_job', 
     'djangocms_image', 
     'djangocms_commons', 
     'djangocms_casestudies', 
     'djangocms_presentations_cases', 
     'djangocms_testimonial', 
     # Your stuff: custom apps go here 
    ) 

    # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps 
    INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS 
    # END APP CONFIGURATION 

Was ich weiß nicht, wie zu löse jetzt. Hat jemand eine Idee dazu?

+0

versuchen, '' django.contrib.staticfiles'' letztes Element in 'INSTALLED_APPS' –

+0

Auch Sie haben viele Apps gibt es die Möglichkeit, dass nicht alle diese Apps mit Django 1.10 kompatibel sind. –

+0

Ja, das Projekt ist ziemlich konsequent. Aber ich bin mir nicht sicher, ob eine App den 'Apps noch nicht geladen'-Fehler auslösen kann. –

Antwort

1

Sie treffen this issue. Die Antwort scheint zu sein, Ihre Version von easy_select2 zu aktualisieren.

Das Problem is fixed in easy_select2 1.3.2+. Beachten Sie, dass die changelog besagt, dass es in Version 1.3 rückwärtskompatible Änderungen gibt.

+0

Lol, in der Tat hatte ich einen Konflikt von Versionen mit easy_select2. Vielen Dank Alasdair! –

Verwandte Themen