[web2py] Re: how to use strftime in view with rows

2016-11-05 Thread Alex Glaros
you're right Anthony {{if r.auth_membership.through_date != None:}}{{=r.auth_membership.through_date.strftime(("%A, %d %B %Y %I:%M %p"))}}{{pass}} thanks both to Anthony and Stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (So

[web2py] Re: how to use strftime in view with rows

2016-11-05 Thread Anthony
On Saturday, November 5, 2016 at 3:56:01 AM UTC-4, Alex Glaros wrote: > > I want to display something like this format: *Saturday, 05 November > 2016, 11:30 AM* > > the field through_date is datetime type > > This: {{=r.auth_membership.through_date}} produces: 2016-11-23 21:14:25 > > When I apply

Re: [web2py] Re: switch to python 3

2016-11-05 Thread António Ramos
what is the gain moving to python 3? 2016-11-05 17:59 GMT+00:00 Leonel Câmara : > web2py is almost completely python 3 compatible. You can follow the issue > here: https://github.com/web2py/web2py/issues/1353 > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > -

[web2py] Re: how to use strftime in view with rows

2016-11-05 Thread Alex Glaros
It needed a render in the controller select statement to make your suggestion work. .select().render() represent = lambda value, field: SPAN('%s' % (value.strftime("%A, %d %B %Y %I:%M %p"))) if value else '' Does the render pose a performance problem? Thanks for the help Stifan Alex -- R

[web2py] Re: switch to python 3

2016-11-05 Thread Leonel Câmara
web2py is almost completely python 3 compatible. You can follow the issue here: https://github.com/web2py/web2py/issues/1353 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (

[web2py] Re: How to translate dynamic data with web2py

2016-11-05 Thread Leonel Câmara
https://groups.google.com/forum/#!topic/web2py/y1QYmM4HfeM -- 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 subsc

[web2py] Re: Python Social Auth - example site working with downlevel version of PSA

2016-11-05 Thread mweissen
It is a very interesting project. Are there any news? Am Freitag, 24. Juni 2016 00:45:51 UTC+2 schrieb Donald McClymont: > > Just a further note that following some further updating I can login via > Facebook, Twitter, Google (using Mozilla Persona) and Microsoft accounts. > There is a test sit

[web2py] Making two queries into one

2016-11-05 Thread Gualter Portella
Dear all, I hope this e-mail finds you all well. I have written two queries to retrieve data from my database (model). I did them initially through plain SQL, then I followed the DAL syntax. They all return the same output regardless the syntax chosen. Please, see the code below: Two differen

[web2py] Re: how to use strftime in view with rows

2016-11-05 Thread 黄祥
i think you can achieve it using represent in dal e.g. db.auth_membership.from_date.represent = lambda value, field: SPAN('%s' % (value.strftime("%A, %d %B %Y") ) ) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] How to translate dynamic data with web2py

2016-11-05 Thread Marko Seppälä
Let's say we have a table db.define_table('thing', Field('name'), Field('description', 'text'),Field('age', 'integer')) and we need to translate this to X amount of different languages and there could be potentially huge amount of these objects

[web2py] how to use strftime in view with rows

2016-11-05 Thread Alex Glaros
I want to display something like this format: *Saturday, 05 November 2016, 11:30 AM* the field through_date is datetime type This: {{=r.auth_membership.through_date}} produces: 2016-11-23 21:14:25 When I apply strftime like this: {{= r.auth_membership.from_date.strftime("%A, %d %B %Y")}} err