Hello,

I'm building a Pylons app that will let authorized users export membership
data to csv. Based on some research I have a working model (below), but I'm
new to serving this type of content and am wondering if there is a
Pylons-preferred method.

One function uses POST data to build a query and then passes it here (this
is a simplified excerpt):

    def export_stream(self, query):
        response.content_type = 'text/csv'
        for member in query:
            yield '%s,%s\n' % (member.id,
member.joindate.strftime('%m/%d/%Y'))

Thanks!
Eric

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
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/pylons-discuss?hl=en.

Reply via email to