Django Template Design

I am trying to get a visual representation of Django project templates as a hierarchy.

The basic idea is to get a list of template names when the default template loading machine returns (ie, compliance TEMPLATE_DIRS, TEMPLATE_LOADERSetc.), and then analyze the templates looking for {% block %}and {% extends%} to create a tree structure . Finally, use grapviz for visualization.

I am not sure if this is a viable approach. But just for starters, how can I download templates the way I described?

Or perhaps something similar already exists?

+3
source share
1 answer

, , .

, grep , , TEMPLATE_LOADERS, . , .
URL- INSTALLED_APPS grep- , . , , ...

, . django.template.base, , .

, django-debug, , . , , , , , , .

+1

All Articles