It's easy to access the table  wiki_page using DAL as usual.

Make a python commandline for your app...
    python web2py.py -S yourapp -M

Type these two lines into your python commandline.
    auth.wiki(resolve=False)
    db().select(db.wiki_page.body).first().body

Otherwise, access via a function:
def mywiki():
    auth.wiki(resolve=False)
    mywikipagefields = db().select(db.wiki_page.ALL).first()
    return dict(mywikipagefields = mywikipagefields)

The wiki_page definition is in gluon/tools.py
        table_definitions = [
            ('wiki_page',{
                    'args':[
                        Field('slug',
                              requires=[IS_SLUG(),
                                        IS_NOT_IN_DB(db,'wiki_page.slug')],
                              readable=False,writable=False),
                        Field('title',unique=True),
                        Field('body','text',notnull=True),
                        Field('tags','list:string'),
                        Field('can_read','list:string',
                              writable=perms,
                              readable=perms,
                              default=[Wiki.everybody]),
                        Field('can_edit', 'list:string',
                              writable=perms,readable=perms,
                              default=[Wiki.everybody]),
                        Field('changelog'),
                        Field('html','text',compute=render,
                              readable=False, writable=False),
                        auth.signature],
              'vars':{'format':'%(title)s'}}),


On Saturday, October 20, 2012 4:15:39 PM UTC+1, apps in tables wrote:
>
>
> Hi Alan,
>
> I really appreciate if you can write an example that access wiki_page 
> without the use of auth_wiki interface. (just one wiki_page is enough)
>
> Regards,
>
> Ashraf
>

-- 



Reply via email to