You should be able to use field.represent to do that.  If the value is
None, then show something else like ''.

Regards
Johann

On 30 March 2015 at 14:54, JorgeH <[email protected]> wrote:

> I am dealing with the same issue these days. Client told me to remove all
> those 'None' fields.
>
>
>
>
> On Monday, March 30, 2015 at 7:36:51 AM UTC-5, Mirek Zvolský wrote:
>>
>> >> null value is not an empty string
>>
>> That's true.
>> However we make applications for customers and they aren't interested to
>> see a technical value 'None', but the language translated value (something
>> like T(None)) or symbol for None content.
>> So I think it would be better if we have parameter how to represent None
>> values elsewhere.
>> Mi
>>
>>
>>
>>
>> Dne pondělí 10. června 2013 17:32:33 UTC+2 Niphlod napsal(a):
>>>
>>> The second one you said (i.e. altering the default repr for None
>>> values). From a "theoretical" standpoint, a null value is not an empty
>>> string. If your app doesn't care for the difference, set a default='' on
>>> the interested fields.
>>>
>>> Il giorno lunedì 10 giugno 2013 15:42:21 UTC+2, Lamps902 ha scritto:
>>>>
>>>> If there's a NULL value in my postgresql DB, SQLFORM.grid renders it as
>>>> "None". Is it there something that can be done globally for an SQLFORM.grid
>>>> that would simply make it display all NULL values as an empty string (i.e.
>>>> not display anything in the grid for NULLs), or does that have to be
>>>> determined individually for every field by setting the respective field's 
>>>> *represent
>>>> *parameter? Thanks.
>>>>
>>>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> 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/d/optout.
>



-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to