是否可以限制占位符类型而不在settings.py中定义它?

类似于:{% placeholder "home_banner_title" image %}

最佳答案

不,你不能。如果您查看at the source for the placeholder template tag,将会看到仅处理namewidthinheritor

无论如何,在此处执行此操作没有任何意义,因为在每次请求期间都会呈现placeholder模板标记,因此未将其链接到django管理员或可用的占位符类型列表

关于python - 在模板中指定Django CMS占位符类型(文本,图片,链接),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23785374/

10-12 22:43