创建自定义django短代码

时间:2014-12-27 18:41:07

标签: django

如何创建自定义短代码?  我确实安装了'django-shortcodes'应用程序,将其添加到项目设置中,将其加载到我的模板中......下一步是什么?  我需要创建我的个人短代码。

1 个答案:

答案 0 :(得分:2)

我假设你在谈论https://github.com/martey/django-shortcodes

您需要将其分叉并在短代码目录中添加新的解析器。

见这里:

https://github.com/martey/django-shortcodes/tree/master/shortcodes/parsers

相关问题