← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1640427] Re: Error with the content of the Horizon dashboard tutorial at http://docs.openstack.org/developer/horizon/topics/table_actions.html#adding-the-url

 

This is already fixed in master branch. For more information please
refer [1]. So marking it as invalid.

[1]
https://github.com/openstack/horizon/blob/master/doc/source/contributor/tutorials/dashboard.rst#urls

** Changed in: horizon
       Status: New => Invalid

-- 
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/1640427

Title:
  Error with the content of the Horizon dashboard tutorial at
  http://docs.openstack.org/developer/horizon/topics/table_actions.html
  #adding-the-url

Status in OpenStack Dashboard (Horizon):
  Invalid

Bug description:
  This tutorial specifies the following changes to be made to urls.py
  file:

  from django.conf.urls import url

  from openstack_dashboard.dashboards.mydashboard.mypanel import views

  urlpatterns = [,
      url(r'^$',
          views.IndexView.as_view(), name='index'),
      url(r'^(?P<instance_id>[^/]+)/create_snapshot/$',
          views.CreateSnapshotView.as_view(),
          name='create_snapshot'),
  ]

  After this change has been made, and after I restart the httpd I get
  an error in the horizon_error.log as posted below:

  __import__(name)
  [:error] [pid 11724] [remote 172.22.225.42:0]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/mydashboard/mypanel/urls.py", line 6
  [:error] [pid 11724] [remote 172.22.225.42:0]     urlpatterns = [,
  [:error] [pid 11724] [remote 172.22.225.42:0]                    ^
  [:error] [pid 11724] [remote 172.22.225.42:0] SyntaxError: invalid syntax

  To fix this issue, we need to remove the comma next to the opening square bracket in urlpatterns = [,
  The resulting code should look like:

  urlpatterns = [
      url(r'^$',
          views.IndexView.as_view(), name='index'),
      url(r'^(?P<instance_id>[^/]+)/create_snapshot/$',
          views.CreateSnapshotView.as_view(),
          name='create_snapshot'),
  ]

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


References