I have created a Django weather app and I would like to host it online. Iam unable to deploy my application on pythonanywhere. Any help will be greatly appreciated.
This is my app's structure:
myapp3.py (main directory)
├── manage.py
├── myweatherapp (sub directory)
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
└── myapp (sub directory)
├── __init__.py
├── models.py
├── tests.py
└── views.py
└── templates (sub directory)
└── static (sub directory)
This is what I have in the "weather_pythonanywhere_com_wsgi.py ":
import os
import sys
path = '/home/weather/myapp3/myweatherapp/settings.py'
if path not in sys.path:
sys.path.append(path)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myweatherapp.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Error log:
2015-03-24 23:58:17,619 :ImportError: No module named wsgi
2015-03-24 23:58:18,290 :Traceback (most recent call last):
2015-03-24 23:58:18,290 : File "/bin/user_wsgi_wrapper.py", line 130, in __call__
2015-03-24 23:58:18,291 : self.error_log_file.logger.exception("Error running WSGI application")
2015-03-24 23:58:18,291 : File "/usr/lib/python2.7/logging/__init__.py", line 1185, in exception
2015-03-24 23:58:18,291 : self.error(msg, *args, **kwargs)
2015-03-24 23:58:18,291 : File "/usr/lib/python2.7/logging/__init__.py", line 1178, in error
2015-03-24 23:58:18,292 : self._log(ERROR, msg, args, **kwargs)
2015-03-24 23:58:18,292 : File "/usr/lib/python2.7/logging/__init__.py", line 1270, in _log
2015-03-24 23:58:18,292 : record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
2015-03-24 23:58:18,292 : File "/usr/lib/python2.7/logging/__init__.py", line 1244, in makeRecord
2015-03-24 23:58:18,292 : rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
2015-03-24 23:58:18,293 : File "/usr/lib/python2.7/logging/__init__.py", line 284, in __init__
2015-03-24 23:58:18,293 : self.threadName = threading.current_thread().name
2015-03-24 23:58:18,293 : File "/usr/lib/python2.7/threading.py", line 1160, in currentThread
2015-03-24 23:58:18,293 : return _active[_get_ident()]
2015-03-24 23:58:18,293 : File "/bin/user_wsgi_wrapper.py", line 122, in __call__
2015-03-24 23:58:18,294 : app_iterator = self.app(environ, start_response)
2015-03-24 23:58:18,294 : File "/bin/user_wsgi_wrapper.py", line 136, in import_error_application
2015-03-24 23:58:18,294 : raise e
2015-03-24 23:58:18,294 :ImportError: No module named wsgi