the represent is like this
represent=lambda x, row:x and A('%s'%(db.t_docs.f_doc.retrieve(x)[0]),
_href=URL('default','viewer.html',args=x),
_target="_blank",
_title=T("open file"),
_class='file-reference')
or ''
Is there something wrokg here?
i copied this code from a file uploader script i found somewhere
i tried starting with a fresh sqlite (storage.sqlite1) and it works!!
In mysql i removed all represend like the one above and still cannot create
table
2013/7/12 Massimo Di Pierro <[email protected]>
> Not sure what this is supposed to do but it is definitively wrong:
>
> Field(..., represent=lambda x, row:x and
> A('%s'%(db.equip_docs.f_doc.retrieve(x)[0]))
>
>
> On Thursday, 11 July 2013 09:17:16 UTC-5, Ramos wrote:
>
>> It was working with sqlite !
>>
>> i use mysqlworkbench and it is not there that table!!!
>>
>> i read that error 150 could be this
>>
>> In addition to SHOW
>> ERRORS<http://dev.mysql.com/doc/refman/5.6/en/show-errors.html>,
>> in the event of a foreign key error involving InnoDB tables (usually
>> Error 150 in the MySQL Server), you can obtain a detailed explanation of
>> the most recent InnoDB foreign key error by checking the output of SHOW
>> ENGINE INNODB STATUS<http://dev.mysql.com/doc/refman/5.6/en/show-engine.html>
>> .
>>
>> and from the error in my ticket that points to this line it leads me
>> thinking in that direction....
>>
>>
>> represent=lambda x, row:x and A('%s'%(db.t_docs.f_doc.retrie**ve(x)[0]),
>>
>>
>>
>>
>> my model is attached. Dont be afraid...
>>
>>
>> 2013/7/11 Niphlod <[email protected]>
>>
>>> then t_docs is definitely ALREADY there!
>>>
>>> error 150 from mysql means "I can't create a table cause it's already
>>> there".
>>>
>>> And there's no way that web2py on an empty database is creating a table
>>> two times unless you're fiddling badly with your models.
>>>
>>>>
>>>> --
>>>
>>> ---
>>> 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+un...@**googlegroups.com.
>>>
>>> For more options, visit
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>> --
>
> ---
> 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.
>
>
>
--
---
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.