i have PIP INSTALL DJANGO-DEBUG-TOOLBAR for django 1.9,and here is the error message when i PYTHON MANAGE.PY RUNSERVER:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 350, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 342, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 176, in fetch_command
commands = get_commands()
File "C:\Python27\lib\site-packages\django\utils\lru_cache.py", line 100, in wrapper
result = user_function(*args, **kwds)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 71, in get_commands
for app_config in reversed(list(apps.get_app_configs())):
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 137, in get_app_configs
self.check_apps_ready()
File "C:\Python27\lib\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.
What i have done is as follows:
1,pip install django-debug-toolbar;
2,add debug_toolbar to INSTALLED_APPS;
3,add 'debug_toolbar.middleware.DebugToolbarMiddleware' to 'MIDDLEWARE_CLASSES ';
4,put 'DEBUG_TOOLBAR_PANELS ' into setting.py file;
5,set DEGUG=True ,and set DEBUG_TOOLBAR_PATCH_SETTINGS = False;
6,as the official document says,put
if settings.DEBUG:
import debug_toolbar
urlpatterns += patterns('',
url(r'^__debug__/', include(debug_toolbar.urls)),
)
into urls.py
7,and all i have done on WINDOWS 10 os, as my test.
Someone can figure out my wrong steps? thanks a lot.