On Tue, 2012-03-20 at 23:04 -0500, Lukasz Szybalski wrote:
> On Mon, Mar 19, 2012 at 1:13 PM, Chris McDonough <chr...@plope.com> 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".

You're likely to be disappointed at things that Pyramid itself or things
that require only Pyramid will provide here.  Pyramid doesn't know
anything about databases at all.

See also
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/designdefense.html#pyramid-doesn-t-offer-pluggable-apps

That said, systems built on top of Pyramid like Ptah
(http://ptahproject.org) and Kotti
(http://danielnouri.org/notes/2011/11/30/how-to-write-an-add-on-for-the-kotti-cms/)
 do provide enough "rails" for this to be possible.

> "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

All of that stuff is complete space-shuttle as far as Pyramid is
concerned.

You should probably adjust how you're thinking about this.  What you're
*asking for* are "plugins".  But what you actually *need* are
applications.

Pyramid is a platform on which you can build *an* application.  An
application built on top of Pyramid might itself allow for pluggable
subapplications, and it might reuse Pyramid's include() functionality to
allow those things to be plugged into it.  This is what Kotti and Ptah
do.

> 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.

Anything I create is probably just going to disappoint you, but maybe
someone else is up for it.  I'd look into Kotti or Ptah if I were you.

- C


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to