Thank you very much Bruno.
Just found out that I can return it in view.
Thanks a lot for your reply.
On Mon, Aug 13, 2012 at 7:48 PM, Bruno Rocha wrote:
> You only can call functions that are in global scope.
>
> if you define function in /models/ so you can call those functions in
> controller
You only can call functions that are in global scope.
if you define function in /models/ so you can call those functions in
controllers and views.
If you defined in controller, so you have to return it to the view.
controller/default.py
---
def foo():
return "bar"
d
Hi All,
Can I call custom functions in views? Functions that I have created in my
controller/default.py.
Thanks.
--
hi,
i try to follow the advise about functions from :
http://web2py.com/book/default/chapter/11#Efficiency-and-Scalability
- Minimize the code in models: do not define functions there, define
functions in the controllers that need them or - even better - define
functions in modules, import them a
No this is not a security measure. This is only a way to decet whether
a certain http header exist and that header is usually set for Ajax
calls originted from web2py componenets
On Sep 21, 11:17 am, Avik Basu wrote:
> I was wondering if it might be possible to limit the URL to functions
> that a
I was wondering if it might be possible to limit the URL to functions
that are called internally from web2py component calls. In the
manual, there is a reference to using a decorator like:
@auth.requires(request.cid)
Would this be an effective safeguard? Also, is there some way to set
this sinc
If the URL is exposed and it is accessible via ajax, than it is called
by the remote browser.
You can only limit access with @auth.requires_login() or other auth
recorator.
On Sep 20, 6:48 pm, Avik Basu wrote:
> I have a generic function called edit_db which allows for editing of
> database reco
I have a generic function called edit_db which allows for editing of
database records and is useful for ajax-related form functions such as
edit-in-place. The URL that is exposed is something like
edit_db/tablename/row_id/fieldname?value="newvalue"
I would like to make sure that this function ca
8 matches
Mail list logo