django自定义URL

修改urls.py

url(r'^add/(\d+)/(\d+)/$','blog.views.add', name='add'),

然后修改识图文件

def add(request,a,b):
    c = int(a) + int(b)
    return HttpResponse(str(c))