You have the last version?, You have _init_.py in module?, You try changing
objects to another name, pehaps a name-conflict?.

2011/8/26 Jarrod Cugley <jcug...@gmail.com>

> I've tried local_import().. Which seems to be deprecated from what
> I've read in this group
>
> I've tried from mymodule import class, and this doesn't seem to work
> either? Is there any documentation on this? Cause I can't really find
> anything that helps me. This is my code:
>
> ### controller/default.py ###
> def search():
>    from objects import Searching
>    return dict(show=Searching.show(db))
>
> ### modules/objects.py ###
> from gluon import *
> request = current.request
>
> class Searching(object):
>    @staticmethod
>    def show(db):
>        search = db(db.listing.title==request.args(0).replace("_","
> ")).select(db.listing.ALL)
>        items = []
>        for person in search:
>            items.append(DIV(A(person.first_name, _href=URL('listing',
> args=person.id))))
>
>        return TAG[''](*items)
>
> ### Error = ImportError: cannot import name Searching ###
>
>
> Can anyone figure out what I've done wrong?




-- 
 http://martin.tecnodoc.com.ar

Reply via email to