http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules

On Friday, March 21, 2014 9:28:14 PM UTC+1, Avi A wrote:
>
> Hi,
> I'm trying to create a background job/function. I'm locating the file on 
> the models directory, as I read on the book.
> When I try to run the script manually, I get an error saying that db is 
> not defined.
> This is part of the code where I get the error:
> ......
> ......
> catalog = csv.reader(webpage)
> for row in catalog:
>     item = db(db.t_items.unfi_product_== row[5]).select().first()
>     if row > 0 and not item:
>         ..........
>
>
> Thanks.
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to