def version(request):
"""
Adds version-related context variables to the context.
"""
response = {}
if django_settings.VERSION:
response = {
'version': django_settings.VERSION.get('version', None),
}
commit = django_settings.VERSION.get('commit')
if commit:
response['commit'] = commit[:7]
return response
context_processors.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录