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

Gabriel Hurley Gabriel.Hurley at nebula.com
Mon Sep 10 19:13:56 UTC 2012


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]
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')),
)
.extra_specs/urls.py

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/abdca969/attachment-0001.html>


More information about the OpenStack-dev mailing list