避免硬编码网站信息
This commit is contained in:
8
utils/templatetags/website_info.py
Normal file
8
utils/templatetags/website_info.py
Normal file
@@ -0,0 +1,8 @@
|
||||
# coding=utf-8
|
||||
from django import template
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def show_website_info(name):
|
||||
return {"website_name": "qduoj", "website_footer": u"青岛大学创新实验室"}[name]
|
||||
Reference in New Issue
Block a user