Reputation: 34160
When making a django request through json as,
var info=id + "##" +name+"##"
$.post("/supervise/activity/" + info ,[] ,
function Handler(data,arr)
{
}
In urls.py
(r'^activity/(?P<info>\d+)/$, 'activity'),
In views,
def activity(request,info):
print info
The request does not go through.info
is a string.How can this be resolved
Thanks..
Upvotes: 0
Views: 1217
Reputation: 33215
^activity/(?P<info>\d+)/$
will only match something like 'activity/42/' and the number (in this case 42) will be info
.
If you appended '##name##' to the url, it will not be recognized.
Upvotes: 4