django - Url paramter with a value with two words -


i have problem calling url, want know whats way pass value 2 words argument or if question not possible

i have in url.py:

url(r'^tiendas/([\w-]+)/$', mostrartiendas.as_view(), name='mostrartiendas'), 

i want pass value called name_tienda field have 2 word , django return error:

page not found (404) request method:     http://localhost:8000/tiendas/tienda%20amiga 

thank all

change url regex this:

url(r'^tiendas/(?p<name_tienda>[-\w]+))', mostrartiendas.as_view(), name='mostrartiendas'), 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -