我只想在设置某个GET变量时在模板中显示某个....我认为使用 {% if request.get.my_var %}会起作用,但它不会给我结果.
Ber*_*ant 13
检查settings.py中的TEMPLATE_CONTEXT_PROCESSORS中是否有django.core.context_processors.request!如果没有把它放在那里,或者自己在渲染的上下文中添加请求! http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-request
| 归档时间: |
|
| 查看次数: |
26414 次 |
| 最近记录: |