yes that was the point.

You can give them a different extension and then say in the controller
action

response.view='%s/%s.kml' % (request.controller, request.action)

but if they are not .html they may not be editable via admin.

Massimo

On Apr 23, 1:37 pm, desfrenes <desfre...@gmail.com> wrote:
> Because web2py templates can be used for any text format, they
> probably shouldn't have .html extension, but it allows to  edit
> templates in any regular html wysiwyg editors.
>
> On 23 avr, 15:34, Timmie <timmichel...@gmx-topmail.de> wrote:
>
> > > You probably should not change the file extension, changing the
> > > headers is sufficient to have your file served as xml
>
> > Yes, I found it out.
>
> > added
>
> > response.headers['Content-Type']= 'application/vnd.google-earth.kml
> > +xml'
>
> > To the controller function.
>
> > Works like a charm now. I haven't even thought that creating KMl from
> > a database is that simple.
>
> > Everyone wanting to create KML with web2py and having difficulties:
> > you can drop be a note.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to