1.项目urls.py
from django.conf.urls import url, includeurlpatterns = [ url(r'^', include('app01.urls', namespace='app01')),]
2.app01.urls.py
from django.conf.urls import urfrom . import viewsapp_name = 'app01'urlpatterns = [ url(r'tiaozhuan/(?P<username����,����>\w+)/$', views.test, name='test'),]
3.app01.views.py
from django.http import HttpResponsedef test(request, username): print(username) return HttpResponse('test')
4.浏览器访问后