Forums

Unable to view site live - Django tutorial

I am really new at this so any assistance would be appreciated.

I followed the django tutorial by creating a project, creating a web app, using manual configuration, editing the wsgi file and uncommenting the code pertaining to django. I then reloaded the web app and visited my site's page at eldorado2768.pythonanywhere.com and it displayed an error. I checked the error log and there is a whole long list of stuff which I do not understand. I hope someone can help me with the errors:

2015-08-07 14:17:00,901 :Traceback (most recent call last): 2015-08-07 14:17:00,902 : File "/usr/local/lib/python3.4/dist-packages/django/utils/module_loading.py", line 28, in import_by_path 2015-08-07 14:17:00,902 : attr = getattr(module, class_name) 2015-08-07 14:17:00,902 :AttributeError: 'module' object has no attribute 'SessionAuthenticationMiddleware' 2015-08-07 14:17:00,902 : 2015-08-07 14:17:00,902 :During handling of the above exception, another exception occurred: 2015-08-07 14:17:00,902 : 2015-08-07 14:17:00,902 :Traceback (most recent call last): 2015-08-07 14:17:00,903 : File "/bin/user_wsgi_wrapper.py", line 130, in call 2015-08-07 14:17:00,903 : self.error_log_file.logger.exception("Error running WSGI application") 2015-08-07 14:17:00,903 : File "/usr/lib/python3.4/logging/init.py", line 1296, in exception 2015-08-07 14:17:00,904 : self.error(msg, args, kwargs) 2015-08-07 14:17:00,904 : File "/usr/lib/python3.4/logging/init.py", line 1289, in error 2015-08-07 14:17:00,905 : self._log(ERROR, msg, args, *kwargs) 2015-08-07 14:17:00,905 : File "/usr/lib/python3.4/logging/init.py", line 1395, in _log 2015-08-07 14:17:00,906 : self.handle(record) 2015-08-07 14:17:00,906 : File "/usr/lib/python3.4/logging/init.py", line 1404, in handle 2015-08-07 14:17:00,907 : if (not self.disabled) and self.filter(record): 2015-08-07 14:17:00,907 : File "/usr/lib/python3.4/logging/init.py", line 692, in filter 2015-08-07 14:17:00,908 : for f in self.filters: 2015-08-07 14:17:00,908 : File "/bin/user_wsgi_wrapper.py", line 122, in call 2015-08-07 14:17:00,908 : app_iterator = self.app(environ, start_response) 2015-08-07 14:17:00,908 : File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/wsgi.py", line 187, in call 2015-08-07 14:17:00,909 : self.load_middleware() 2015-08-07 14:17:00,909 : File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 45, in load_middleware 2015-08-07 14:17:00,909 : mw_class = import_by_path(middleware_path) 2015-08-07 14:17:00,909 : File "/usr/local/lib/python3.4/dist-packages/django/utils/module_loading.py", line 31, in import_by_path 2015-08-07 14:17:00,910 : error_prefix, module_path, class_name)) 2015-08-07 14:17:00,910 :django.core.exceptions.ImproperlyConfigured: Module "django.contrib.auth.middleware" does not define a "SessionAuthenticationMiddleware" attribute/class 2015-08-07 14:17:01,813 :Traceback (most recent call last): 2015-08-07 14:17:01,813 : File "/usr/local/lib/python3.4/dist-packages/django/utils/module_loading.py", line 28, in import_by_path 2015-08-07 14:17:01,814 : attr = getattr(module, class_name) 2015-08-07 14:17:01,814 :AttributeError: 'module' object has no attribute 'SessionAuthenticationMiddleware'

You probably have a Django version mismatch. That is that the code you have is for a version of Django that is different to the version that you're actually running. If you want to use a specific version of Django, you may need to use a virtualenv. There are instructions on the help pages.