[81.95.157.172] out: Traceback (most recent call last):[81.95.157.172] out: File "<string>", line 1, in <module>[81.95.157.172] out: File "/home/rjackson87/.virtualenvs/richardjackson/lib/python2.7/site-packages/django/__init__.py", line 18, in setup[81.95.157.172] out: apps.populate(settings.INSTALLED_APPS)[81.95.157.172] out: File "/home/rjackson87/.virtualenvs/richardjackson/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate[81.95.157.172] out: app_config = AppConfig.create(entry)[81.95.157.172] out: File "/home/rjackson87/.virtualenvs/richardjackson/lib/python2.7/site-packages/django/apps/config.py", line 86, in create[81.95.157.172] out: module = import_module(entry)[81.95.157.172] out: File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module[81.95.157.172] out: __import__(name)[81.95.157.172] out: ImportError: No module named debug_toolbar[81.95.157.172] out:
Fatal error: run() received nonzero return code 1 while executing!
Requested: python -c "import os;os.environ['DJANGO_SETTINGS_MODULE']='richardjackson.settings';import django;django.setup();from django.conf import settings;print(settings.STATIC_ROOT)"Executed: /bin/bash -l -c "cd /home/rjackson87/webapps/richardjackson >/dev/null && source /home/rjackson87/.virtualenvs/richardjackson/bin/activate && python -c \"import os;os.environ['DJANGO_SETTINGS_MODULE']='richardjackson.settings';import django;django.setup();from django.conf import settings;print(settings.STATIC_ROOT)\""
On Sunday 29 January 2017 09:48:31 Richard Jackson wrote:
> Hi Vijay - that's going to be the problem; I've installed it locally
> but haven't installed it on my (Webfaction-provided) server.
So don't add it to installed apps. One common pattern is to only enable debug tools when settings.DEBUG is True.
So in settings.py make sure INSTALLED_APPS is a list (not a tuple), remove debug_toolbar and add this code:
if DEBUG:
INSTALLED_APPS.append('debug_toolbar')
Done.
Now, all you have to do is not enable DEBUG on the server. Of course, that's the same problem since you're pushing settings.py to the server. And for that, see how Mezzanine solved it using a local_settings.py that is not pushed to the server.
--
Melvyn Sopacua