Like jonathan said if you want args in module you have to pass it.

===============
controller/default.py
===============

def index():
    name = request.args[0]
    mymodule = local_import("mymodule")
    myclass = mymodule.MyClass(name)


=====================
modules/mymodule.py
=====================

class MyClass(object):

    def __init__(self, name):

        self.name = name


2011/2/5 walter <[email protected]>

> Where can I find a description of the framework, or UML diagrams? I'm
> not quite clear about its architecture.
>
> On 5 фев, 03:25, Jonathan Lundell <[email protected]> wrote:
> > On Feb 4, 2011, at 2:28 PM, walter wrote:
> >
> >
> >
> > > I define a decorator into the modules folder and try get request.args.
> > > How to do correct import of request and use it in my decorator?
> >
> > > I try something like this:
> > > env = globals()
> > > args = env.request.args
> >
> > An imported module has its own namespace, so it doesn't know about
> request. Can you pass it in?
>



-- 
Pablo Martín Mulone ([email protected])
http://www.tecnodoc.com.ar/
Paraná, Entre Ríos, Argentina (CP 3100).

My blog: http://martin.tecnodoc.com.ar
Expert4Solution Profile:
http://www.experts4solutions.com/e4s/default/expert/6

Reply via email to