Very true. This is more general than t2, I just dislike adding so
many symbols to the global namespace, so this could be added to a
helpers.* object if it existed.
The reason for this proposal is that currently you cannot import
actions easily:
# in controllers/default.py
from modules.crud import create
The create action will not be found because actions are currently
found with a regex.
Robin
On Jan 8, 1:19 pm, "Yarko Tymciurak" <
yark...@gmail.com> wrote:
> Let me double check to make sure:
>
> this behavior - non-argumented controllers being exposed / accessible from
> a client - is not (only) t2; this is general web2py behavior,
>
> correct?
>
> On Thu, Jan 8, 2009 at 1:15 PM, Yarko Tymciurak <
yark...@gmail.com> wrote:
> > yep - after reading that thread Robin pointed to at the head of this
> > thread, the space behavior definitely looks like an expedient hack...
>
> > and reading the response from Massimo there:
> > "If you have
> > function that does not take *arguments* and you still don't want to
> > expose it you can also use a trick..."
>
> > I'm with Robin - forget the "tricks" and be explicit... but, as I
> > suspected, the usual intent is expose no-argument controllers, so the
> > exceptional case calls for a decorator, a better name than I originally
> > posted:
>
> > @not_exposed
> > def myfunc():
> > #blah, blah, ...
>