I just checked... id is not present:
"<Row {'artista': 387, 'nome': 'aaaa', 'image':
'personagem.image.b2754a53c6cdcc7e.69626d2d4c6f676f2e6a7067.jpg', 'novela':
'9', 'slug': 'aaaa', 'descricao': 'aaaa'}>"


On Wed, Mar 27, 2013 at 2:24 PM, Roberto Perdomo <[email protected]>wrote:

> Try:
>
> Field('image_filename', readable=False, writable=False, compute = lambda
> row: request.post_vars.image.filename + row.id),
> El mar 27, 2013 12:39 PM, "Tito Garrido" <[email protected]> escribió:
>
> How could I also append the id of the row in image_filename?
>>
>> Thanks!
>>
>> Tito
>>
>>
>> On Mon, Mar 25, 2013 at 4:58 PM, Tito Garrido <[email protected]>wrote:
>>
>>> Worked! It should go to the book :)
>>> http://web2py.com/books/default/chapter/29/07#Storing-the-original-filename
>>>
>>> Thanks!
>>>
>>> Tito
>>>
>>>
>>> On Mon, Mar 25, 2013 at 4:53 PM, Massimo Di Pierro <
>>> [email protected]> wrote:
>>>
>>>> You can use this:
>>>>  Field('image_filename', readable=False, writable=False, compute =
>>>> lambda row: request.post_vars.image.filename),
>>>>
>>>>
>>>> On Monday, 25 March 2013 13:28:19 UTC-5, Tito Garrido wrote:
>>>>>
>>>>> Hi!
>>>>>
>>>>> Why this does not work:
>>>>> Field('image', 'upload', requires=IS_NOT_EMPTY(), uploadseparate=True,
>>>>> autodelete=True,),
>>>>>     Field('image_filename', readable=False, writable=False, compute =
>>>>> lambda row: row.image.filename),
>>>>>
>>>>> Using a form I can follow the book and fill the image filename:
>>>>>     if request.vars.image!=None:
>>>>>         try:
>>>>>             form.vars.image_filename = request.vars.image.filename
>>>>>         except:
>>>>>             form.vars.image_filename = request.vars.image
>>>>>
>>>>> How can I do the same using SQLFORM.grid?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Tito
>>>>>
>>>>> --
>>>>>
>>>>> Linux User #387870
>>>>> .........____
>>>>> .... _/_õ|__|
>>>>> ..º[ .-.___.-._| . . . .
>>>>> .__( o)__( o).:_______
>>>>>
>>>>  --
>>>>
>>>> ---
>>>> 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.
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Linux User #387870
>>> .........____
>>> .... _/_õ|__|
>>> ..º[ .-.___.-._| . . . .
>>> .__( o)__( o).:_______
>>>
>>
>>
>>
>> --
>>
>> Linux User #387870
>> .........____
>> .... _/_õ|__|
>> ..º[ .-.___.-._| . . . .
>> .__( o)__( o).:_______
>>
>> --
>>
>> ---
>> 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.
>
>
>



-- 

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

-- 

--- 
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.


Reply via email to