Django - 模型图形表示(ERD) [英] Django - Model graphic representation (ERD)
问题描述
我正在寻找一种以图形方式表示我的 Django 项目模型的方法.
I'm searching a way to represent my Django project model graphically.
是否有一种本地"方式来执行这种ERD(图表)?
Is there a "native" way to do this kind of ERD (diagram) ?
这是我最终如何查看代表我的 django 项目的某些模型的 PDF 的示例
Here is an example of how I finally view the PDF representing some models of my django project
$ python manage.py graph_models app1 app2 ... | dot -Tpdf | evince
- 它实际上使用我的应用程序(app1、app2、...)生成点数据
- 将结果传递给
dot
输出为PDF格式 - 使用
evince
打开输出
- It actually generates the dot data with my applications (app1, app2, ...)
- Passes the result to
dot
to output into PDF format - Opens the output with
evince
推荐答案
如果你想从你的 Django 模型中提取 UML 图,你可以使用 django-extensions 的/latest/graph_models.html">图形模型 命令.另一个做大部分相同的事情:django-graphviz.
If you want to extract UML diagram from your Django models you can use the Graph models command of django-extensions. Another one that do mostly the same thing: django-graphviz.
如果您想从 UML 创建 Django 模型:uml-to-django.
If you want to create your Django models from UML: uml-to-django.
And to create UML diagrams, there's Dia, yED and ArgoUML
您也可以查看此工具列表.
这篇关于Django - 模型图形表示(ERD)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!