def get_openrosa_headers(self, request, location=True):
tz = pytz.timezone(settings.TIME_ZONE)
dt = datetime.now(tz).strftime('%a, %d %b %Y %H:%M:%S %Z')
data = {
'Date': dt,
'X-OpenRosa-Version': '1.0',
'X-OpenRosa-Accept-Content-Length': DEFAULT_CONTENT_LENGTH
}
if location:
data['Location'] = request.build_absolute_uri(request.path)
return data
openrosa_headers_mixin.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录