I tried that out Alvar, I know about python packages, and I have been
using them for a while in the modules folder, but since its a
subfolder in the Controllers folder, the FORM class and other things
are missing.

Oh well

On May 14, 9:10 pm, Álvaro Justen [Turicas] <alvarojus...@gmail.com>
wrote:
> On Thu, May 14, 2009 at 3:54 PM, Voltron <nhy...@googlemail.com> wrote:
>
> > Done that, was a pain Massimo as I explained in my first post:
>
> > "This is not possible for some reason. I could have put them in the
> > "modules" folder, but that involves import gluon.html.gluon.languages
> > e.t.c which is also a headache. Is there any workaround?
> > "
>
> > it is a headache, I donot want to track every module or function that
> > I need to create, translate or validate forms in my forms module
>
> A "package" is a path with __init__.py.
> So if you want to include "applcations.yourapp.controllers.something",
> all of these paths (applications, applications/yourapp,
> applications/yourapp/welcome and
> applications/yourapp/welcome/controllers) must have __init__.py empty
> (generally...) file inside.
>
> So, create __init__.py in applications/yourapp/controllers AND in
> applications/yourapp/controllers/forms (you have __init__, not
> __init__.py). So you can do:
>
> import applications.yourapp.controllers.forms.reg_form as reg_form
>
> --
>  Álvaro Justen
>  Peta5 - Telecomunicações e Software Livre
>  21 3021-6001 / 9898-0141
>  http://www.peta5.com.br/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to