为Django模板创建继承图/树 [英] Create inheritance graphs/trees for Django templates

查看:192
本文介绍了为Django模板创建继承图/树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有任何工具可以使用Django应用程序的目录,扫描模板并绘制/打印/列出模板之间的继承层次结构?



解决方案

旧问题,但FWIW有(或者是) django-template-graph ,应该与Django 1.7配合使用。



当Django 1.8+的模板逻辑改变了一点,所以它不需要修补,我打开了一个问题,可能会很快释放一个修复。


Is there any tool out there that would take a directory with a Django application, scan it for templates and draw/print/list a hierarchy of inheritance between templates?

Seeing which blocks are being overridden at every level would be an especially helpful feature in such a tool.

解决方案

Old question but FWIW there is (or was) django-template-graph that should work with Django 1.7.

It doesn't (yet) work with Django 1.8+ when the template logic changed a bit so it needs to be patched, I opened an issue for that and will probably release a fix soon.

这篇关于为Django模板创建继承图/树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆