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
Post a Comment