views:

56

answers:

1

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..

+3  A: 

^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.

Satoru.Logic