百分号格式化的另一种用法
# cache_format = 'throttle_%(scope)s_%(ident)s'
return self.cache_format % {
'scope': self.scope,
'ident': self.get_ident(request)
}
# cache_format = 'throttle_%(scope)s_%(ident)s'
return self.cache_format % {
'scope': self.scope,
'ident': self.get_ident(request)
}