Passing an array in django urls
Can we pass an array to a django url
<script>
function save()
{
window.location = "/display/xlsdisplay/" + objarr ;
}
var objarr = new Array();
</script>
Urls.py
(r'^xlsdisplay/(?P<qid>\开发者_JAVA百科d+)$', 'xlsdisplay'),
There is an error saying
http://192.168.1.11/display/xlsdisplay/334,335,336,337,338,339,340,341,342,343
- The regular expression used in your URL will only match a sequence of digits. The comma will require a different expression.
- I don't know your specific need but you ought to look at naming URLs rather than hard cording them.
精彩评论