django之normalize函数的功能

Posted on 2018-06-30 15:13  王将军之武库  阅读(162)  评论(0编辑  收藏  举报
from django.utils.regex_helper import normalize
pat=r'^(?P<id>\d+)/(?P<name>\d+)$'
bits=normalize(pat)
print bits

结果是: [(u'%(id)s/%(name)s', [u'id', u'name'])]

Copyright © 2024 王将军之武库
Powered by .NET 9.0 on Kubernetes