python - Pass multiple params in django url -


i have "viewtree "url requires multiple input params arbitrary strings input.

i have tried following 2 implementations of url_patterns:

urlpatterns=[     url(r'^$',views.home,name='home')     url(r'^(?p<cutoff>.*)/(?p<threshold>.*)/(?p<data_file>.*)/(?p<clustering_func>.*)/(?p<num_groups>.*)',views.viewtree,name='tree') ] 

and

urlpatterns=[     url(r'^$',views.home,name='home')     url(r'^(?p<cutoff>.*)-(?p<threshold>.*)-(?p<data_file>.*)-(?p<clustering_func>.*)-(?p<num_groups>.*)',views.viewtree,name='tree') ] 

both of these implementations not working me , returning syntax errors. wondering syntax error , how fix it. (also did have regex .* correct matching arbitrary length string).

also how write action part of post form in html send these values form viewtree view. have like

<form action="{% url 'appname:viewtree' cutoff threshold data_file clustering_func num_groups %}" method ="post">      rest of form </form> 


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -