Create your models/controllers/views/static files etc everything as
you normally would, But append the word "plugin_" in front of it
so
models/plugin_test.py
controllers/plugin_test.py
views/plugin_test/index.html
static/plugin_test/logo.png
But also follow the database/global def namespace convention so
db.define_table('plugin_test_links', Field('link', requires=IS_URL),
Field('time', 'datetime', default=request.now))
def plugin_get_links():
return db().select(db.plugin_test_links.ALL)
Your plugin will show up as a different section (at the bottom) of
web2py admin, and you can go into it and then click "pack" and it will
make a plugin zipped file that can be unpacked.
-Thadeus
On Mon, Feb 1, 2010 at 11:25 AM, K.R.Arun <[email protected]> wrote:
> Will some one tell me, how to make a plugin?
>
> For example a layout plugin, or an OAuth plugin, or anything like
> that.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web2py-users" 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/web2py?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"web2py-users" 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/web2py?hl=en.