I publish my blog on Django , on Pythonanywhere hosting. Static files gathered, migrate did.
In wsgi:
import os import sys path = '/home/nitrogen987654321/my-first-blog' # use your own username here if path not in sys.path: sys.path.append(path) os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise application = DjangoWhiteNoise(get_wsgi_application()) Django = 1.8
Python = 3.4
Eventually:
What am I doing wrong? Tell me.
I try to execute wsgi line by line. does not generate an error, and only after adding the last line application = get_wsgi_application () produces the following errors: 
And the logs are as follows:
2016-04-30 13:39:10,006 :Error running WSGI application Traceback (most recent call last): File "/bin/user_wsgi_wrapper.py", line 154, in __call__ app_iterator = self.app(environ, start_response) File "/bin/user_wsgi_wrapper.py", line 170, in import_error_application raise e File "/bin/user_wsgi_wrapper.py", line 154, in __call__ app_iterator = self.app(environ, start_response) File "/bin/user_wsgi_wrapper.py", line 170, in import_error_application raise e File "/bin/user_wsgi_wrapper.py", line 154, in __call__ app_iterator = self.app(environ, start_response) File "/bin/user_wsgi_wrapper.py", line 170, in import_error_application raise e File "/bin/user_wsgi_wrapper.py", line 154, in __call__ app_iterator = self.app(environ, start_response) File "/bin/user_wsgi_wrapper.py", line 170, in import_error_application raise e File "/bin/user_wsgi_wrapper.py", line 179, in <module> application = load_wsgi_application() File "/bin/user_wsgi_wrapper.py", line 175, in load_wsgi_application return __import__(os.environ['WSGI_MODULE'], globals(), locals(), ['application']).application File "/var/www/nitrogen987654321_pythonanywhere_com_wsgi.py", line 17, in <module> application = get_wsgi_application() File "/home/nitrogen987654321/my-first-blog/qblog/lib/python3.4/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup() File "/home/nitrogen987654321/my-first-blog/qblog/lib/python3.4/site-packages/django/__init__.py", line 17, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/home/nitrogen987654321/my-first-blog/qblog/lib/python3.4/site-packages/django/conf/__init__.py", line 55, in __getattr__ self._setup(name) File "/home/nitrogen987654321/my-first-blog/qblog/lib/python3.4/site-packages/django/conf/__init__.py", line 43, in _setup self._wrapped = Settings(settings_module) File "/home/nitrogen987654321/my-first-blog/qblog/lib/python3.4/site-packages/django/conf/__init__.py", line 99, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/home/nitrogen987654321/my-first-blog/qblog/lib/python3.4/importlib/__init__.py", line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: No module named 'mysite' 