1
${name | default:'nohting' }

如果nameFalse,我想使用一个默认值,比如nothingreplaced

4

1 回答 1

0

there is no default filter like that

But you can use your own customized template tags for that

https://docs.djangoproject.com/en/dev/howto/custom-template-tags/

于 2013-08-29T03:46:01.270 回答