Having trouble posting to this group. Sorry for the duplicates.

Changed the code.

class PlotboxTable(TableBase):
    __model__ = Plotbox
    __omit_fields__ = ['plotbox_id', 'password', 'netmask', '__actions__']
    __add_fields__ = {'config_zip_url':None}
    #__xml_fields__ = ['config_zip_url']
    __xml_fields__ = {'config_zip_url':None}

The config_zip_url is still being escaped.

Can __add_fields__ also be __xml_fields__ ?


On Saturday, May 19, 2012 11:23:03 PM UTC-5, [email protected] wrote:
>
> Trying to get an __add_fields__ to NOT be escaped to the links will 
> just work. 
>
> class PlotboxTableFiller(TableFiller): 
>     __model__ = Plotbox 
>     __add_fields__ = {'config_zip_url':None} 
>
>     def config_zip_url(self, obj): 
>         url = '<a href="">%s://%s/configs/%d/config.zip</a>' % \ 
>             (request.environ['wsgi.url_scheme'], 
> request.environ['HTTP_HOST'], obj.plotbox_id) 
>         return url 
>
> class PlotboxTable(TableBase): 
>     __model__ = Plotbox 
>     __omit_fields__ = ['plotbox_id', 'password', 'netmask', 
> '__actions__'] 
>     __add_fields__ = {'config_zip_url':None} 
>     __xml_fields__ = ['config_zip_url'] 
>
>
> But I get the following displayed. 
>
> <a href="">http://127.0.0.1:8080/configs/10/config.zip</a> 
>
> How can I get it so me __add_fields__ are not escaped? 
>
> Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/turbogears/-/Ce7251iim1gJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to