[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-20 Thread villas
Hi Alan I was only talking about the specific feature of putting this into a view: {{=auth.wiki('slug')}} I really like auth.wiki(), but being used in that way (inside a view) it misbehaves, as I described. If it doesn't find a wiki page, I would sometimes prefer it to fail silently and

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-19 Thread villas
If you request a page that doesn't exist, then you are directed to _create. It would be nice to be able to suppress that behaviour. You have to be logged in to go on and create the page. If you call a wiki page inside a view with auth.wiki(slug='mywrongpage') it does not always redirect

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-19 Thread Alan Etkin
If you request a page that doesn't exist, then you are directed to _create. It would be nice to be able to suppress that behaviour. You have to be logged in to go on and create the page. That could be easily fixed by adding an auth.is_logged_in() check, but what would be the correct

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread villas
I guess we don't need {{=auth.wiki('slug')}} to read a wiki page into a view because we can just use LOAD(). So maybe we should just deprecate it (if it was ever official). --

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread Massimo Di Pierro
Can I see your controller? On Thursday, 18 October 2012 12:11:21 UTC-5, villas wrote: I want to read the content of a wiki page into my view: views/mycontroller/mypage.html using: {{=auth.wiki(my-wiki-slug') }} auth.wiki is on a function in: controllers/default.py If the wiki page is

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread villas
I already posted a longer answer, which appears to have disappeared. However, my controller was simply something like def article(): auth.wiki() BTW if I start a commandline session like this: python web2py.py -S myapp -M db.tables Then none of my auth.wiki tables are defined. Can I

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread Bill Thayer
This is in my db.py. Allen told me to add the second line after calling auth.define_tables auth.define_tables(username=True, signature=False, migrate=True,fake_migrate =True) auth.wiki(resolve=False) the second line calls the wiki() function to create the tables. Regards, Bill --

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread Bill Thayer
Back on the original topic. When I click on a menu item I also get re-directed back to the _create page. Is this a permission thing perhaps? Now that I mention it, isn't there supposed to be a field to select the permission level for the page? --

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread villas
I tried it and that defined the tables. Thanks Bill! On Friday, October 19, 2012 1:24:45 AM UTC+1, Bill Thayer wrote: This is in my db.py. Allen told me to add the second line after calling auth.define_tables auth.define_tables(username=True, signature=False,