1

Is there any way to write a view in Plone using only Python? I found a way for forms, but what else can you build for views ? Without tal expressions

Link: https://docs.plone.org/4/en/develop/addons/helloworld/extend/form.html

ChsharpNewbie
  • 1,040
  • 3
  • 9
  • 21

1 Answers1

1

You can write a view using Python that generates the HTML you want, without the need for a template.

Please have a look at https://training.plone.org/5/mastering-plone-5/index.html, specifically https://training.plone.org/5/mastering-plone-5/views_2.html#view-classes

Generally, it's best to ask Plone questions in our forum, https://community.plone.org

  • 1
    I don't think there is a particular name to it, just a browser view, but you always decide where you want the HTML to be generated, whether in a template, or Python class, or a mix of both, and even within a template you decide what you want to be be static and what you want to have Python or TAL calculate. – T. Kim Nguyen Sep 02 '21 at 15:28
  • But to build a table you need again TAL ? – ChsharpNewbie Sep 02 '21 at 15:30
  • 1
    No, you can write the Python code to generate the table – T. Kim Nguyen Sep 02 '21 at 15:35
  • If you write everything in Python instead of TAL you can also leave out JQuery(AJAX) for dynamic content ? – ChsharpNewbie Sep 02 '21 at 15:39
  • 1
    I don't think the Python code can handle dynamically updated content. It sounds like you have a very specific thing in mind, so I am probably not the best person to answer. Please go to the forum https://community.plone.org and describe what you want to accomplish. – T. Kim Nguyen Sep 02 '21 at 15:51