Django函数——url()

The url() function is passed four arguments, two required: regex and view, and two optional: kwargs, and name.

url(r'^$', views.index, name='index'),

url(r'^polls/', include('polls.urls')),
url(r'^admin/', admin.site.urls),

^匹配输入字符串开始

$匹配输入字符串结束

     
url() argument: regex   https://www.example.com/myapp/?page=3,
url() argument: view    
url() argument: kwargs
dictionary  
url() argument: name lets you refer to it unambiguously  

常用正则表达式:http://tool.oschina.net/regex/#

Django函数——url()Django函数——url()

上一篇:oracle 表类型变量的使用


下一篇:[网络编程]VS2010+OpenSSL安装与初步了解