*
db = DAL('sqlite://storage.sqlite')

db.define_table(
    'product_car',
    Field('seller_id', db.auth_user, default=auth.user_id),
    Field('name', requires = IS_NOT_EMPTY()),
    Field('price', 'double', default=0.00),
    Field('description','text'),
    Field('image', 'upload', default=''),
    format = '%(name)s %(price)s')
    
db.define_table(
    'product_property',
    Field('seller_id', db.auth_user, default=auth.user_id),
    Field('name', requires = IS_NOT_EMPTY()),
    Field('price'),
    Field('description','text'),
    Field('image', 'upload', default=''),
    format = '%(name)s %(price)s')
*

I get the following error for the above code in the db.py file. Can anyone 
be kind enough to assist me?Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 212, in restricted
    exec ccode in environment
  File "/home/www-data/web2py/applications/rafer/models/db.py" 
<https://ec2-54-227-137-230.compute-1.amazonaws.com/admin/default/edit/rafer/models/db.py>,
 line 94, in <module>
    Field('seller_id', db.auth_user, default=auth.user_id),
  File "/home/www-data/web2py/gluon/dal.py", line 7902, in __getattr__
    return ogetattr(self, key)
AttributeError: 'DAL' object has no attribute 'auth_user'

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to