Thanks very much for the response. Nothing seems to work. The force_render 
option didn't make any difference. The auth.wiki.get_renderer caused an 
error.
Here is my controller with some debugging code. I am simply trying to 
access the wiki_page table:

# -*- coding: utf-8 -*-
def index(): return auth.wiki(force_render=True)


@auth.requires_membership('administrator')
def refreshWiki():
    count = 0
    for row in db(db.wiki_page).select():
        count = count+1
    return "pages "+str(count)

When I trigger the refreshWiki method, I get a ticket on the "for row..." 
line:
<type 'exceptions.AttributeError'> 'DAL' object has no attribute 'wiki_page'
This is strange because the database has the table 'wiki_page' and I can 
access the table from the wiki menu in the application. 
The variable auth is defined in the db.py code as
auth = Auth(db)

The version of web2py is 2.9.12stable.
Again, the wiki works fine on the local host. This is an issue when the 
application is packaged and uploaded to pythonanywhere.

Thanks for any help you can provide.
Peter

On Friday, August 21, 2015 at 1:26:18 AM UTC-4, Massimo Di Pierro wrote:
>
> The wiki caches the rendered pages in HTML for speed. So when the app 
> moves the cached pages contain the wrong links.
>
> the auth.wiki(...) method has a force_render which you can set to True
>
> auth.wiki(force_render=True) which will re-create the cached content when 
> pages are called. 
> or you can do:
>
> render = auth.wiki.get_renderer
> for row in db(db.wiki_page).select():
>      row.update_record(html=render(row.page))
> db.commit()
>
> Massimo
>
>
>
>
> On Thursday, 20 August 2015 14:13:48 UTC-5, [email protected] <javascript:> 
> wrote:
>>
>> I have the same problem as Andrew W. When deployed to pythonanywhere.com 
>> the pages still point to the local host.
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to