Hi,
I have read the documentation for creating an extensible app (
http://docs.pylonsproject.org/projects/pyramid/en/master/narr/extending.html) and I think I understand most of it.
I have an app that can be used to visualize some specific alerts and would want it to be extensible. Specifically add-on features should be pluggable.
So my bare-bone apps will have views and templates that display the alerts and allow ,say, grouping. I can write a plug-in that allows user-corelation. And another plugin that handles prioritized alerts. While a third plug-in can handle localization data. Currently I do this using multiple if's in the views and the templates but it is clunky and a nightmare to test. How do I go about transforming my app into a plug-in type architecture while avoiding code, especially template, duplication?
Example - Say my app displays alert names,times, sources and references. Now my plug-in will also display user-information (As another column in an HTML table). I can partially reuse the view (by calling functions from the original app's view), but how do I reuse the old template while simply adding newer code to it. I use sqlalchemy as ORM and jinja2 as templating language