which web2py version. this should not happen with 1.74.5.

On Jan 6, 5:28 pm, Miguel <goncalvesmig...@gmail.com> wrote:
> Hi
>
> I have the following model:
>
> db.define_table("sites",
>         SQLField("category_id",db.category),
>         SQLField("owner",db.auth_user, writable=False, readable=False),
>     SQLField("url", "string",length=2048, notnull=True,
> default=None),
>     SQLField("parent_site", "reference sites"))
>
> However this gives me the following error on GAE
>
> Traceback (most recent call last):
>   File "C:\web2py\gluon\restricted.py", line 173, in restricted
>     exec ccode in environment
>   File "C:/web2py/applications/mlinks/models/db.py", line 91, in
> <module>
>     SQLField("posted_on","datetime",writable=False, readable=False))
>   File "C:\web2py\gluon\contrib\gql.py", line 127, in define_table
>     t = self[tablename] = Table(self, tablename, *fields)
>   File "C:\web2py\gluon\contrib\gql.py", line 203, in __init__
>     field.requires = gluon.sql.sqlhtml_validators(field)
>   File "C:\web2py\gluon\sql.py", line 454, in sqlhtml_validators
>     referenced = field._db[field_type[10:]]
>   File "C:\web2py\gluon\sql.py", line 1265, in __getitem__
>     return dict.__getitem__(self, str(key))
> KeyError: 'sites'
>
> Am I doing something wrong or is it a bug?
>
> Thanks
> Miguel
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to