How to configure wsgi application to migrate to django 1.7?
Question: I'm trying to upgrade from Django 1.6 to 1.7.

When running python manage.py runserver, I got the following error :

    
    
    django.core.exceptions.ImproperlyConfigured: WSGI application 'myapp.wsgi.application' could not be loaded; Error importing module: 'cannot import name get_path_info'
    

Here's the corresponding line in my settings.py :

    
    
    WSGI_APPLICATION = 'myapp.wsgi.application'
    

Here's my wsgi.py file :

    
    
    import os
    
    # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
    # if running multiple sites in the same mod_wsgi process. To fix this, use
    # mod_wsgi daemon mode with each site in its own daemon process, or use
    # os.environ["DJANGO_SETTINGS_MODULE"] = "myapp.settings"
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings")
    
    # This application object is used by any WSGI server configured to use this
    # file. This includes Django's development server, if the WSGI_APPLICATION
    # setting points here.
    from django.core.wsgi import get_wsgi_application
    
    # Apply WSGI middleware here.
    # from helloworld.wsgi import HelloWorldApplication
    # application = HelloWorldApplication(application)
    
    from dj_static import Cling
    application = Cling(get_wsgi_application())
    

Any idea to fix it ?


Answer: What version of dj_static are you using?

I upgraded to Django 1.7 and my site broke, leading me to your question.

I checked my dj_static version (I had been using 0.0.5 and noticed that the
latest release at the time of this writing is
[0.0.6](https://github.com/kennethreitz/dj-static/releases)).

Upon updating dj_static, my site appears to be functioning properly under
Django 1.7.

