Hi,

I'm learning web2py and i want to put my business logic inside a class in 
module.
I like to have a behaviour similar to user controller inside default.py 
which exposes several functions.

I have a controller item which i put inside default.py
def item():
     return dict(form=product())

in module i create product class

class Product(object):
     def __init__:

     def list(self):

     @auth.requires_login()
     def add_product(self):

The Product.list function can be accessed by anyone, but for adding new 
product need user login first.
Is this possible? 
Does the auth can used directly or i need to import something first?

Thank,
Reza

-- 

--- 
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/groups/opt_out.


Reply via email to