如何在django模板系统中分配变量?
假设Restaurant是一个模型:
Restaurant
{% restaurant_id as restaurant.id %}或者{{ restaurant_id as restaurant.id }}不工作.
{% restaurant_id as restaurant.id %}
{{ restaurant_id as restaurant.id }}
django django-templates
django ×1
django-templates ×1