Comment 5 for bug 344665

Revision history for this message
Massimo (mdipierro) wrote : Re: [Bug 344665] Re: Going into, design and clicking on "database administration"

No that is correct because tags as stored as strings not as one to
many references.

On Apr 26, 2009, at 3:59 AM, Andre wrote:

> I believe this is wrong:
> db.Field('tags', 'text'), db.py, line 44
>
> Shouldn't that be something like:
> db.Field('tags', db.tag),
>
> --
> Going into, design and clicking on "database administration"
> https://bugs.launchpad.net/bugs/344665
> You received this bug notification because you are the registrant for
> web2py-wiki.
>
> Status in web2py_-wiki: Incomplete
>
> Bug description:
> Going into, design and clicking on "database administration"
> generates a error. ( I am trying to track it down now.)
> Error traceback
> Traceback (most recent call last):
> File "/home/jds/web2py.1.58/gluon/restricted.py", line 98, in
> restricted
> exec ccode in environment
> File "/home/jds/web2py.1.58/applications/web2py_wiki/views/
> appadmin.html", line 146, in <module>
> AttributeError: 'str' object has no attribute 'tag'
> -- snip --
> for tag in db(db.tag.id>0).select(orderby=db.tag.name):
> response.write('\n',escape=False)
> response.write(LI(A(tag.name,_href=URL
> (r=request,f='pages_by_tag',args=tag.id))))
> response.write('\n',escape=False)
> pass
>
> ------------------------------------------------------------------------------------------
>> Check your sql.log - did the database get made?
> yep, got the log.
> and also did
> $ sqlite3 storage.db
> .tables
> verified that all of the tables are there.
> --------------------------------------------------------
> auth_event auth_permission document
> auth_group auth_user page
> auth_membership comment tag
> ----------------------------------------------------------
>> From looking @ the code. I was thinking the same
> thing... maybe the tables were not there or correct.
> I can "select * from <db>", in all of the tables using
> the sqlite interface directly.
>
>>> probably some catch if there is no db's or no connections would be
>>> helpful...
>
> there is a catch in the appadmin.html view for "no databases"
>
> Note: If I take out line 15 - 23 of web2py_wiki/views/appadmin.html
> the page will load.