Tried putting the function in a model and calling the return value in the
view. Didn't work.
I think what is confusing me is use of two different controller files.
Certainly easy to reference actions when used in menus and anywhere in
code just using the URL function. But, this auth code needs to be called
from the view the way auth.navbar is. I really just want a replacement for
auth.navbar.
I would really like to do {{=controller/user.bar()}}. But, Massimo has
pointed out that is trying to turn Web2py into a "pull" framework, which it
is not. I like the way web2py works so I don't want that, but I do want a
drop in replacement for auth.navbar().
On Friday, December 14, 2012 5:16:43 PM UTC-8, Lewis wrote:
>
> Sure, if I called it already. To do so, might make most sense to put in a
> model.
>
> But, I was hoping that the view would call it. There is another path
> through the app with very simplified pages that uses its own auth and I
> expect most users to follow that path. so, only folks editing content need
> this particular auth.
>
> But, happy to put in model if that is easiest. (I know from some of your
> posts you particularly like to minimize what is models and controllers....)
>
> Thanks for your reply.
>
> On Friday, December 14, 2012 5:10:18 PM UTC-8, rochacbruno wrote:
>>
>> If you called http://.../user_bar the function is already called by
>> web2py so you only need
>>
>> <div id="navbar">{{=bar}}</div>
>>>
>>
>>
>>
--