I'm rewriting it, but it's a different story. It's called powerpack. Instant
press is blog/ cms application solution oriented to visual. But in powerpack
I want to achieve that  could make an cms or blog but this don't mix with
the rest of the application, because powerpack is boilerplate app like
welcome, you can do your application an add pages you can administer, or add
comments to some of your controllers. I'm rewriting powerpack that are
comming in the nexts weeks in version 2.0.

The develop version of 2.0 is in
https://bitbucket.org/mulonemartin/web2pyboilerplate/overview but when are
ready is going to replace powerpack.

Some example

=====Controllers===========

from plugins.comments.main import PluginCommentsdef plugin_comments():
    """ Example plugin PluginComments """

    _ = PluginComments(boilerplate)
    _.install()
    comments = _.render()

    return dict(comments=comments)


This example in controllers, not required nothing in models (only
boilerplate that is central class) so does not interfered with others
controllers, it's loaded when it's need it and give comments when you do
/mycontroller/plugin_comments


def plugin_markitup():
    """ Example plugin Markitup """

    """ Move to your models if you want to use in all controllers."""
    _ = PluginMarkitup(boilerplate)
    _.render('#mytextarea')

    mytextarea = TEXTAREA(_id='mytextarea')

    return dict(textarea=mytextarea)
def plugin_sunlight():
    """ Example plugin Sunlight """

    """ Move to your models if you want to use in all controllers."""
    _ = PluginSunlight(boilerplate)
    content = _.render("""    ``    def test():       return "this is
Python code"    ``:python    """)

    return dict(content=content)
def plugin_simplecontact():
    """ Example plugin Simplecontact """

    _ = PluginSimpleContact(boilerplate)
    form = _.render()

    return dict(form=form)



2011/7/22 DanB <[email protected]>

> Martin,
>
> Thanks so much for the quick response! That makes a few things a lot more
> clear, thank you.
>
> I really like a lot of the things the InstantPress does, and as I'm a
> rather novice programmer, I thought I would work through your example to
> learn more, and maybe build some things I've got in mind.
>
> If I may, let me ask this: with the changes to web2py, from a high-level
> design perspective, how would you change the code and/or structure of
> Instant Press if you wrote it now? It seems to work well, and is farily
> modular in its own way.




-- 
 http://martin.tecnodoc.com.ar

Reply via email to