On Tuesday, February 17, 2015 at 6:31:26 PM UTC-8, Leonardo Pires Felix 
wrote:
>
> Also, there is a way to represent two types, text and html?
>
> For example, if i want to make a tooltip of a date fiel, to make things 
> clean and easy for the user, I would do:
>
>
> <https://lh5.googleusercontent.com/-SPmSRMlcTjU/VOP4g-v2c6I/AAAAAAAAAfg/WnJ4hsfiaek/s1600/exemplo.png>
>
> That is a the return of the represent field:
> dt_str = valor.strftime("%d/%m/%Y")
> return SPAN(dt_str, **{'_data-toggle': "tooltip",
>                        '_data-placement': "top",
>                        '_title': valor.strftime("%A").title()})
>
> But if i try to export that. I'll get the html on the export file.
>
There is a way to separate the HTML of the text that will be represented in 
> export? Like a represent_html and represent_text?
>


SPAN() let's you wrap stuff with XML(), as do most helpers.
<URL:http://www.web2py.com/books/default/chapter/29/05/the-views#SPAN>
I don't fully grok your arguments SPAN() above, but I suspect XML() is what 
you're looking for.

(the usual named arguments that SPAN() accepts, like _style, are as far as 
my mind has expanded)

/dps


/dps
 

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to