Ok,
To complete my example: You should define two tables (db.py)
db.define_table('tag',Field('name',length=16),format='%(name)s')
db.define_table('entry',
Field('title',length=64),
# (...) some other fields
Field('tags','list:reference tag'))
2012/12/11 hasan alnator <[email protected]>
> <type 'exceptions.AttributeError'> 'DAL' object has no attribute
> 'entry'VERSION
> web2py™ (2, 1, 1, datetime.datetime(2012, 10, 15, 12, 44, 40),
> 'stable')PythonPython
> 2.7.3: C:\Python27\python.exe TRACEBACK
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
>
> Traceback (most recent call last):
> File "C:\web2py\gluon\restricted.py", line 209, in restricted
>
> exec ccode in environment
> File "C:/web2py/applications/A3rasna_latestshop/controllers/admin.py"
> <http://127.0.0.1:8000/admin/default/edit/A3rasna_latestshop/controllers/admin.py>,
> line 22, in <module>
>
> File "C:\web2py\gluon\globals.py", line 187, in <lambda>
>
> self._caller = lambda f: f()
>
> File "C:/web2py/applications/A3rasna_latestshop/controllers/admin.py"
> <http://127.0.0.1:8000/admin/default/edit/A3rasna_latestshop/controllers/admin.py>,
> line 12, in edit
>
> entries =
> db(db.entry.tags.contains(request.vars.table)).select(db.entry.ALL)
>
> File "C:\web2py\gluon\dal.py", line 7150, in __getattr__
>
> return ogetattr(self, key)
> AttributeError: 'DAL' object has no attribute 'entry'
>
> --
>
>
>
>
--