[openstack-dev] HELP -- horizon -- urls

Bhandaru, Malini K malini.k.bhandaru at intel.com
Mon Sep 10 19:27:53 UTC 2012

These urls are auto-generated by the magic of table row action and did not when I had a namespace called "extras" defined.
They however worked if I removed the "extras" namespace and re-wrote the url patterns .. violating the neat module/namespace approach.

From: Gabriel Hurley [mailto:Gabriel.Hurley at nebula.com]
Sent: Monday, September 10, 2012 12:14 PM
To: OpenStack Development Mailing List
Subject: Re: [openstack-dev] HELP -- horizon -- urls

If you're seeing the URL passed through like that, it means that Django couldn't "reverse" the URL... in other words, the URL identifier you gave it (plus any additional or missing arguments) didn't match a known URL pattern. Take a careful look to see if you're forgetting to give the URL pattern any arguments it needs; that's the most common problem.

-        Gabriel

From: Bhandaru, Malini K [mailto:malini.k.bhandaru at intel.com]<mailto:[mailto:malini.k.bhandaru at intel.com]>
Sent: Friday, September 07, 2012 5:17 PM
To: OpenStack Development Mailing List
Subject: [openstack-dev] HELP -- horizon -- urls

I have a urls.py which refers to a namespace "extras" as below:
But the generate page has href is in colon format?!

<a href='horizon:syspanel:flavors:extras' > View Extra Specs </a>
<a href='/syspanel/flavors/1/edit/'  > Edit Flavor </a>

from .extra_specs import urls as extra_specs_urls
from .views import IndexView, CreateView, EditView

urlpatterns = patterns('horizon.dashboards.syspanel.flavors.views',
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^create/$', CreateView.as_view(), name='create'),
    url(r'^(?P<id>[^/]+)/edit/$', EditView.as_view(), name='edit'),
    url(r'^(?P<id>[^/]+)/extras/',include(extra_specs_urls, namespace='extras')),

from django.conf.urls.defaults import patterns, url
from .views import IndexView, CreateView, EditView

urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'create/$', CreateView.as_view(), name='create'),
    url(r'^(?P<keyid>[^/]+)/edit/$', EditView.as_view(), name='edit'),
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20120910/966b4889/attachment.html>

More information about the OpenStack-dev mailing list