I am beginner in the Pylon’s pyramid framework and I am dealing with the creation of reusable components in it.
Suppose you have some complex widget, e.g. calendar displaying some dates offering some actions (next month, previous month) and you want to display this widget on many different pages in your app.
In symfony or nette framework, you would just create some component and you can use it on various pages after that.
What is the preferable way, how to deal with such a needs in Pyramid framework? Is there some alternative of symfony components? Or should I build something like that on top of Pyramid?
If you are using Mako as template engine, you can utilize it’s
<%include>tag. It places the contents of the included file (wich contains code for your reusable component) into your template and you can pass parameters to it:This mechanism completely covers reusable UI components for me.