problem with urlpatterns in django
why the url pattern like this:
api/actions/info/(?P<user_id>)/(?P<action_id>)/
does开发者_JAVA百科 not recognize this url:
http://address/api/actions/info/3/4/
Because you don't actually match anything within the groups.
Use
^api/actions/info/(?P<user_id>\d+)/(?P<action_id>\d+)/
You've named your groups, but they don't actually contain anything.
api/actions/info/(?P<user_id>\d+)/(?P<action_id>\d+)/
精彩评论