yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #58510
[Bug 1640427] [NEW] Error with the content of the Horizon dashboard tutorial at http://docs.openstack.org/developer/horizon/topics/table_actions.html#adding-the-url
Public bug reported:
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'),
]
** Affects: horizon
Importance: Undecided
Assignee: Varsha (varsha-jayaraj94)
Status: In Progress
** Tags: horizon-core
** Description changed:
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'),
+ 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 = [,
+ 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'),
+ urlpatterns = [
+ url(r'^$',
+ views.IndexView.as_view(), name='index'),
+ url(r'^(?P<instance_id>[^/]+)/create_snapshot/$',
+ views.CreateSnapshotView.as_view(),
+ name='create_snapshot'),
]
** Changed in: horizon
Assignee: (unassigned) => Varsha (varsha-jayaraj94)
** Changed in: horizon
Status: New => In Progress
--
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):
In Progress
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
Follow ups