Is there a tool for visualizing the structure of a project / Django information flow?

I would like to be able to view the structure of my Django project, i.e. which URLs indicate which views, which views point to which templates, which css files are included in the templates, etc.

I know about a great model visualization tool in Django command extensions , but I need another tool that can render links between:

  • URLs and views;
  • Views and patterns;
  • Templates and other templates (via {% extends %} , {% include %} and custom template tags);
  • Templates and static files (css, js, images).

Whether there is a?

+7
source share
1 answer

It is not possible to create the tools you are looking for that will work in practice. Django does not force you to any structure. The tool can only work with a strict structure. Also django allows you to take full advantage of the dynamic nature of python. It’s too difficult to create tools that can understand the dynamics of your project.

A few examples:

  • views can be methods generated by factory methods.

  • View can display various patterns in different situations.

  • URLs can be generated dynamically

  • Custom reslover url can use

  • The variable can be used in the {% extend %} tag. Assume one anonymous template for an authenticated user and another for an anonymous user.

Tools that give you a lot of visual information about the project are common to the java world, but not to python.

One of the advantages of python is that it allows you to quickly write readable code. Usually well-written and well-structured code explains it very well without additional tools.

To make it easier to find templates / views, you should have a good structure for your code and possibly invent some project-level naming conventions for views / templates / URLs.

+4
source

All Articles