Skip to content

Commit 88182aa

Browse files
committed
add graphviz support and use it in classic-ui/views
1 parent 00508c5 commit 88182aa

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

docs/classic-ui/views.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ Views are usually a combination of:
1818
- a Python class, which performs the user interface logic setup, and
1919
- corresponding {ref}`plone:classic-ui-templates-label`, or direct Python string output.
2020

21+
```{eval-rst}
22+
.. graphviz::
23+
:align: center
24+
25+
digraph viewstructure {
26+
{
27+
node [margin=5,shape=box]
28+
}
29+
ZCML -> {Python, Template};
30+
}
31+
```
32+
33+
2134
Templates should kept simple and logic kept in a separate Python file. This enhances readability and makes components more reusable. You can override the Python logic or the template file, or both.
2235

2336
When you are working with Plone, the most common view type is `BrowserView`

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@
5454
"sphinxext.opengraph",
5555
"sphinx.ext.viewcode", # plone.api
5656
"sphinx.ext.autosummary", # plone.api
57+
"sphinx.ext.graphviz",
5758
]
5859

60+
graphviz_output_format = 'svg'
5961

6062
# If true, the Docutils Smart Quotes transform, originally based on SmartyPants
6163
# (limited to English) and currently applying to many languages, will be used

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ sphinxcontrib.httpdomain # plone.restapi
1313
sphinxcontrib.httpexample # plone.restapi
1414
sphinxcontrib-spelling
1515
sphinxext-opengraph
16+
graphviz

0 commit comments

Comments
 (0)