← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1183310] Re: Broken compatibility with Django 1.4

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1183310

Title:
  Broken compatibility with Django 1.4

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  Horizon is broken on the current master (commit
  a0fc2fd2b4c1057e3c6ba05dca627931b7436108) with Django 1.4.5.

  Steps:
  1. Make sure you use Django 1.4
  2. git pull
  3. python manage.py runserver
  4. browse to http://localhost:8000/

  Expected: the login page is displayed
  Actual: error page saying:
   ImportError at /
  No module named response

  Under Django 1.5.1 the issue disappears.


  The server log:
  --------------------

  $ python manage.py runserver
  Validating models...

  0 errors found
  Django version 1.4.5, using settings 'openstack_dashboard.settings'
  Development server is running at http://127.0.0.1:8000/
  Quit the server with CONTROL-C.
  ERROR:django.request:Internal Server Error: /
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/handlers/base.py", line 89, in get_response
      response = middleware_method(request)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/middleware/locale.py", line 21, in process_request
      check_path = self.is_language_prefix_patterns_used()
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/middleware/locale.py", line 54, in is_language_prefix_patterns_used
      for url_pattern in get_resolver(None).url_patterns:
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/urlresolvers.py", line 328, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/urlresolvers.py", line 323, in urlconf_module
      self._urlconf_module = import_module(self.urlconf_name)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/utils/importlib.py", line 35, in import_module
      __import__(name)
    File "/home/thomas/work/code/horizon/openstack_dashboard/urls.py", line 36, in <module>
      url(r'', include(horizon.urls))
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/conf/urls/__init__.py", line 25, in include
      patterns = getattr(urlconf_module, 'urlpatterns', urlconf_module)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/utils/functional.py", line 184, in inner
      self._setup()
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/utils/functional.py", line 248, in _setup
      self._wrapped = self._setupfunc()
    File "/home/thomas/work/code/horizon/horizon/base.py", line 715, in url_patterns
      return self._urls()[0]
    File "/home/thomas/work/code/horizon/horizon/base.py", line 746, in _urls
      url(r'^%s/' % dash.slug, include(dash._decorated_urls)))
    File "/home/thomas/work/code/horizon/horizon/base.py", line 456, in _decorated_urls
      url(r'^%s/' % panel.slug, include(panel._decorated_urls)))
    File "/home/thomas/work/code/horizon/horizon/base.py", line 230, in _decorated_urls
      urlpatterns = self._get_default_urlpatterns()
    File "/home/thomas/work/code/horizon/horizon/base.py", line 83, in _get_default_urlpatterns
      urls_mod = import_module('.urls', package_string)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/utils/importlib.py", line 35, in import_module
      __import__(name)
    File "/home/thomas/work/code/horizon/openstack_dashboard/dashboards/project/instances/urls.py", line 23, in <module>
      from .views import IndexView, UpdateView, DetailView, LaunchInstanceView
    File "/home/thomas/work/code/horizon/openstack_dashboard/dashboards/project/instances/views.py", line 41, in <module>
      from .workflows import LaunchInstance, UpdateInstance
    File "/home/thomas/work/code/horizon/openstack_dashboard/dashboards/project/instances/workflows/__init__.py", line 1, in <module>
      from create_instance import *
    File "/home/thomas/work/code/horizon/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py", line 35, in <module>
      from openstack_dashboard.usage import quotas
    File "/home/thomas/work/code/horizon/openstack_dashboard/usage/__init__.py", line 17, in <module>
      from .base import BaseUsage, ProjectUsage, GlobalUsage, almost_now
    File "/home/thomas/work/code/horizon/openstack_dashboard/usage/base.py", line 10, in <module>
      from django.http.response import HttpResponse
  ImportError: No module named response
  [23/May/2013 10:15:51] "GET / HTTP/1.1" 500 220819
  ERROR:django.request:Internal Server Error: /favicon.ico
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/handlers/base.py", line 89, in get_response
      response = middleware_method(request)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/middleware/common.py", line 67, in process_request
      if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/urlresolvers.py", line 531, in is_valid_path
      resolve(path, urlconf)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/urlresolvers.py", line 420, in resolve
      return get_resolver(urlconf).resolve(path)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/urlresolvers.py", line 298, in resolve
      for pattern in self.url_patterns:
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/urlresolvers.py", line 328, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/urlresolvers.py", line 323, in urlconf_module
      self._urlconf_module = import_module(self.urlconf_name)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/utils/importlib.py", line 35, in import_module
      __import__(name)
    File "/home/thomas/work/code/horizon/openstack_dashboard/urls.py", line 36, in <module>
      url(r'', include(horizon.urls))
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/conf/urls/__init__.py", line 25, in include
      patterns = getattr(urlconf_module, 'urlpatterns', urlconf_module)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/utils/functional.py", line 184, in inner
      self._setup()
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/utils/functional.py", line 248, in _setup
      self._wrapped = self._setupfunc()
    File "/home/thomas/work/code/horizon/horizon/base.py", line 715, in url_patterns
      return self._urls()[0]
    File "/home/thomas/work/code/horizon/horizon/base.py", line 746, in _urls
      url(r'^%s/' % dash.slug, include(dash._decorated_urls)))
    File "/home/thomas/work/code/horizon/horizon/base.py", line 456, in _decorated_urls
      url(r'^%s/' % panel.slug, include(panel._decorated_urls)))
    File "/home/thomas/work/code/horizon/horizon/base.py", line 230, in _decorated_urls
      urlpatterns = self._get_default_urlpatterns()
    File "/home/thomas/work/code/horizon/horizon/base.py", line 83, in _get_default_urlpatterns
      urls_mod = import_module('.urls', package_string)
    File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/utils/importlib.py", line 35, in import_module
      __import__(name)
    File "/home/thomas/work/code/horizon/openstack_dashboard/dashboards/project/instances/urls.py", line 23, in <module>
      from .views import IndexView, UpdateView, DetailView, LaunchInstanceView
    File "/home/thomas/work/code/horizon/openstack_dashboard/dashboards/project/instances/views.py", line 41, in <module>
      from .workflows import LaunchInstance, UpdateInstance
    File "/home/thomas/work/code/horizon/openstack_dashboard/dashboards/project/instances/workflows/__init__.py", line 1, in <module>
      from create_instance import *
    File "/home/thomas/work/code/horizon/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py", line 35, in <module>
      from openstack_dashboard.usage import quotas
    File "/home/thomas/work/code/horizon/openstack_dashboard/usage/__init__.py", line 17, in <module>
      from .base import BaseUsage, ProjectUsage, GlobalUsage, almost_now
    File "/home/thomas/work/code/horizon/openstack_dashboard/usage/base.py", line 10, in <module>
      from django.http.response import HttpResponse
  ImportError: No module named response

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1183310/+subscriptions