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