0.1不带参数的两种方式
<a href="/hello/">跳到hello</a>
<a href="{% url 'hello' %}">跳转</a>
0.2带参数
def hello2(request,name):
return HttpResponse('hello {} 吃屁'.format(name))
<a href="/hello/">跳到hello</a>
<a href="{% url 'hello' %}">跳转</a>
def hello2(request,name):
return HttpResponse('hello {} 吃屁'.format(name))