On Mon, Mar 19, 2012 at 1:13 PM, Chris McDonough <[email protected]> wrote: > On Mon, 2012-03-19 at 11:04 -0700, Mike Orr wrote: > >> So it sounds like Lukasz is asking for a way to make a view with >> customizable output. I can see a possibility for this if the view is >> written to use "something" that can be overridden. I'm not sure where >> to go from there, or what kind of plugin mechanism would be suitable.
I guess I'm just looking for example a hello world plugin (http://trac-hacks.org/wiki/HelloWorldPlugin) and how do I go about designing it for pyramid. 1. You start up your scaffold "alchemy" app and start adding plugins to it to help you get to a point where you start building what you need. 2. How do you add /admin page that allows you to add/edit/delete records in database? Why wouldn't I be able to just download this plugin for pyarmid and enable it. Or write a plugin so I could reuse it in all my apps. 3. How would one go about building a /admin page similar to trac that allows you to for example view a list of plugins installed "included". "Example of how to use the existing include() machinery to include some configuration that registers one or more views" is probably what I'm looking for exactly. I will have to research that to see how one would build admin page that registers views that access your database and allow you to add/edit/delete records. Create some docs, and hopefully one could use that as a example to lets say build "permission editing" or "auto build views based on what is in database"..etc I've created a ticket# for this : https://github.com/Pylons/pyramid/issues/507 Let me know if somebody from pyramid team is able to build a sample plugin in less then an hour that I could look at code and start learning. Thank you, Lucas >> Can overriding assets be used for more than just static files? Or >> would ZCA be useful in this case (and not overkill)? > > ZCA is probably not really useful here. > > What I think Lukasz is asking for is an example of how to use the > existing include() machinery to include some configuration that > registers one or more views. That's just a matter of: > > def includeme(config): > config.add_view(...) > > if __name__ == '__main__': > config = Configurator() > config.include(includeme) > > But I think he wants to see a more complicated example that does > something else. I don't really know. > >> Lukasz, when you have a more precise specification of the kind of >> plugin articile you want, you can add it to the TODO page in the >> Pyramid Cookbook or file a bug report on it. The more precise you make >> the request (with a use case and which kind(s) of plugin systems), the >> more likely somebody will write it. > > Talking about "plugin systems" is probably overeager here. I think what > Lukasz may need to do is to enumerate the goals implied by his use of > the term "plugin system" and maybe describe one (read: not all!) of > those goals in concrete detail so we can provide an example of how he > might accomplish it using the existing machinery. > > - C > > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/pylons-discuss?hl=en. > http://lucasmanual.com/ -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
