I just fixed this in trunk and I will rebuilding the new nightly built, try 
in 1h.

On Monday, 16 February 2015 21:08:31 UTC-6, Leonardo Pires Felix wrote:
>
> Hi, when i return a XML from the represent, it gives me a error.
> Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
> 17.
> 18.
>
> Traceback (most recent call last):
>   File "/home/leonardo/PycharmProjects/lpfx_gie/web2py/gluon/restricted.py", 
> line 224, in restricted
>     exec ccode in environment
>   File 
> "/home/leonardo/PycharmProjects/lpfx_gie/web2py/applications/gie/controllers/secretaria.py"
>  <http://127.0.0.1:8000/admin/edit/gie/controllers/secretaria.py>, line 771, 
> in <module>
>   File "/home/leonardo/PycharmProjects/lpfx_gie/web2py/gluon/globals.py", 
> line 393, in <lambda>
>     self._caller = lambda f: f()
>   File "/home/leonardo/PycharmProjects/lpfx_gie/web2py/gluon/tools.py", line 
> 3444, in f
>     return action(*a, **b)
>   File 
> "/home/leonardo/PycharmProjects/lpfx_gie/web2py/applications/gie/controllers/secretaria.py"
>  <http://127.0.0.1:8000/admin/edit/gie/controllers/secretaria.py>, line 416, 
> in entradas
>     exportclasses=classeExportar, 
> orderby=~db.entrada_cartao_alunos.horario_entrada)
>   File "/home/leonardo/PycharmProjects/lpfx_gie/web2py/gluon/sqlhtml.py", 
> line 2661, in grid
>     value = field.formatter(value)
>   File "/home/leonardo/PycharmProjects/lpfx_gie/web2py/gluon/dal/objects.py", 
> line 1636, in formatter
>     value = item.formatter(value)
>   File "/home/leonardo/PycharmProjects/lpfx_gie/web2py/gluon/validators.py", 
> line 2373, in formatter
>     year = value.year
> AttributeError: 'XML' object has no attribute 'year'
>
>
> But when i remove the XML, it gives me no error. So, The represent of the 
> field has limitation?
> I'm tryng to return a attr html type.
> That's the content of the represent method
> dt_str = valor.strftime("%H:%M:%S %d/%m/%Y")
> return XML('<abbr title="%s">%s</abbr>' % (valor.strftime("%A").title(), 
> dt_str))
>
>
>

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