I get the following error after upgrading to django 2.0 from 1.11

python manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).
February 22, 2018 - 07:07:06
Django version 2.0.2, using settings 'swd.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Unhandled exception in thread started by <function 
check_errors.<locals>.wrapper 
at 0x7fc8a5e9f8c8>
Traceback (most recent call last):
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/utils/module_loading.py"
, line 20, in import_string
    return getattr(module, class_name)
AttributeError: module 'django.contrib.auth.middleware' has no attribute 
'SessionAuthenticationMiddleware'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/core/servers/basehttp.py"
, line 44, in get_internal_wsgi_application
    return import_string(app_path)
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/utils/module_loading.py"
, line 17, in import_string
    module = import_module(module_path)
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/importlib/__init__.py"
, line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in 
_call_with_frames_removed
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/swd_django/swd/swd/wsgi.py", 
line 17, in <module>
    application = get_wsgi_application()
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/core/wsgi.py"
, line 13, in get_wsgi_application
    return WSGIHandler()
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/core/handlers/wsgi.py"
, line 140, in __init__
    self.load_middleware()
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/core/handlers/base.py"
, line 37, in load_middleware
    middleware = import_string(middleware_path)
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/utils/module_loading.py"
, line 24, in import_string
    ) from err
ImportError: Module "django.contrib.auth.middleware" does not define a 
"SessionAuthenticationMiddleware" attribute/class

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/utils/autoreload.py"
, line 225, in wrapper
    fn(*args, **kwargs)
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/core/management/commands/runserver.py"
, line 141, in inner_run
    handler = self.get_handler(*args, **options)
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/runserver.py"
, line 27, in get_handler
    handler = super().get_handler(*args, **options)
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/core/management/commands/runserver.py"
, line 66, in get_handler
    return get_internal_wsgi_application()
  File 
"/media/sharan/Work/Coding/FOSS/swd_django/lib/python3.6/site-packages/django/core/servers/basehttp.py"
, line 49, in get_internal_wsgi_application
    ) from err
django.core.exceptions.ImproperlyConfigured: WSGI application 
'swd.wsgi.application' could not be loaded; Error importing module.

my wsgi.py:
import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "swd.settings")

application = get_wsgi_application()

my settings.py:
WSGI_APPLICATION = 'swd.wsgi.application'



Could someone help me out?

TIA
Sharan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/47c3e862-3557-4cfe-a9d8-11683a598575%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to