[web2py] Re: rendering custom dict to xml, csv, and py

2016-11-14 Thread Dave S
On Monday, November 14, 2016 at 2:07:39 PM UTC-8, Dave S wrote: > > > > On Monday, November 14, 2016 at 1:35:01 PM UTC-8, lucas wrote: >> >> how about simpler? >> >> from StringIO import StringIO >> stream = StringIO("test for echo") >> stream.write

[web2py] Re: rendering custom dict to xml, csv, and py

2016-11-14 Thread Dave S
On Monday, November 14, 2016 at 1:35:01 PM UTC-8, lucas wrote: > > how about simpler? > > from StringIO import StringIO > stream = StringIO("test for echo") > stream.write("oh crap") > stream.seek(0) > response.header

[web2py] Re: rendering custom dict to xml, csv, and py

2016-11-14 Thread lucas
how about simpler? from StringIO import StringIO stream = StringIO("test for echo") stream.write("oh crap") stream.seek(0) response.headers['Content-Type'] = 'text/plain; charset=us-ascii' response.hea

[web2py] Re: rendering custom dict to xml, csv, and py

2016-11-14 Thread Dave S
On Monday, November 14, 2016 at 12:04:53 PM UTC-8, Dave S wrote: > > [...] > If it's any help, the appadmin.py for returning a CSV is > > def csv(): > import gluon.contenttype > response.headers['Content-Type'] = \ > gluon.contenttype.contenttype('.csv') > db = get_database(r

[web2py] Re: Equivalent of request.args(...) for request.vars(...)

2016-11-14 Thread Anthony
On Monday, November 14, 2016 at 1:29:11 PM UTC-5, Brendan Barnwell wrote: > > Of course, but that's equally true of the "List" class that provides the > request.args functionality. That's just Python code. I could write it > myself. But web2py provides it for convenience. I'm just saying it w

[web2py] Re: rendering custom dict to xml, csv, and py

2016-11-14 Thread Dave S
On Sunday, November 13, 2016 at 8:57:28 PM UTC-8, lucas wrote: > > hey one and all, > > i'm reading chapter 10 in the book and it doesn't make sense and i don't > know how to structure my code to fit the framework. it is confusing. > > so how about, if i explain what i'm trying to do and you'll

[web2py] Re: Equivalent of request.args(...) for request.vars(...)

2016-11-14 Thread Brendan Barnwell
Of course, but that's equally true of the "List" class that provides the request.args functionality. That's just Python code. I could write it myself. But web2py provides it for convenience. I'm just saying it would be nice to have similar convenience for request.vars. You're right that dic

[web2py] Re: About T()

2016-11-14 Thread Leonel Câmara
My guess is that it isn't being generated because the email is not being generated by a request but by a scheduler worker or something, so you don't have an Accept-Language header, you need to do something like T.force('pt'). -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

[web2py] Re: Equivalent of request.args(...) for request.vars(...)

2016-11-14 Thread Anthony
On Monday, November 14, 2016 at 1:53:33 AM UTC-5, Brendan Barnwell wrote: > > The request.args object has a handy callable interface that allows > specification of default value, type to coerce to, etc. As far as I can > tell, the request.vars object has no such interface. Is this right? Why

[web2py] Re: SQLFORM grid search : Get ids of filtered records

2016-11-14 Thread Anthony
On Monday, November 14, 2016 at 2:07:02 AM UTC-5, Anthony Smith wrote: > > Hi Anthony, > > I thought I would try this, but getting the following error: > (global name 'selected_true_callback' is not > defined) > It would be great if you could explain what I am doing wrong > You said you alread

[web2py] Re: About T()

2016-11-14 Thread António Ramos
However i have in a view {{=XML(T("FileIT:Manage your documents Online"))}} and i dont see the new text on pt.py i´m rendering the view with html = response.render('templates/email.html', ...) mail.send(to=row.sendto,subject=row.subject,message=("",html),sender="some_email") any ideas? regards

[web2py] Re: About T()

2016-11-14 Thread António Ramos
I got it. It generates the keywords as they are accessed from each country.. 2016-11-14 16:12 GMT+00:00 António Ramos : > Hello im in Portugal and i noticed that when i use T('keyword') > i only find "keyword" in file pt.py > > Is it correct? > should i see it in all language files? > I would l

[web2py] About T()

2016-11-14 Thread António Ramos
Hello im in Portugal and i noticed that when i use T('keyword') i only find "keyword" in file pt.py Is it correct? should i see it in all language files? I would like to have it in all language files because i´m create an ap for many countries.. regards antónio -- Resources: - http://web2py.co

Re: [web2py] Re: DAL with db2 on ISeries/OS400 table names converted to AUTH_0000x

2016-11-14 Thread Jim S
Also, you could create an alias for those tables using the longer names. http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/sqlp/rbafycreatingalias.htm create alias library/auth_membership for library/auth_1 create alias library/auth_permissions for library/auth_2 Just curious, are