创建一个名为的文件,
context_processors.py并编写以下上下文处理器:
from django.conf import settingsdef cardspring(request): return { 'CARDSPRING_APP_ID': settings.CARDSPRING_APP_ID }然后添加
your.location.context_processors.cardspring到
TEMPLATE_CONTEXT_PROCESSORSDjango设置文件中,文件
your.location的位置在哪里
context_processors.py。



