[web2py] Web2Py + GAE + Memcache | How to Implement in Web2Py

2018-02-25 Thread PRACHI VAKHARIA
1. *How to deploy Web2Py+Memcache on GAE * 2. *How does one configure and also monitor the memcache server on GAE from web2py?* The description and details *here* are not enough or

Re: [web2py] _href to URL()

2018-02-25 Thread 黄祥
@anthony, tested your code but the result is not expected, it's added another a href *usually use in response.menu :* (T('Address'), False, URL('master', 'address'), [] ), *result:* Address *change into :* (A('Address', _href='/test/master/address', _class='dropdown-item'), False, *None*),

Re: [web2py] embed a pdf

2018-02-25 Thread Marco Mansilla
This download = URL("download", args=p.pdf) Should be download = URL("default", "download", args=p.pdf) You can do that on the view. But the change on the controller should do. El 25 feb. 2018 15:54, "Martin Weissenboeck" escribió: What I want to do: I store a pdf-file

[web2py] embed a pdf

2018-02-25 Thread Martin Weissenboeck
What I want to do: I store a pdf-file in a database table. Then I want to show this file. The model: db.define_table("pdfs", Field("pdf", "upload", uploadfield="pdfdata"), Field("description", "text"), Field("pdfdata","blob") ) The controller: def showpdf(): id =

Re: [web2py] Re: controller with multiprocessing powers. Howto?

2018-02-25 Thread António Ramos
Ok thank you 2018-02-25 2:35 GMT+00:00 Massimo Di Pierro : > Pierre is right. That is not the way to do it. This is an example of the > XY problem. > > One way to do it to use the scheduler your tasks and performs the queries > in background. > > > > On Thursday, 22

Re: [web2py] embed a pdf

2018-02-25 Thread Martin Weissenboeck
Sorry, it does not work. The same results with or without "default" 2018-02-26 4:20 GMT+01:00 Marco Mansilla : > This > > download = URL("download", args=p.pdf) > > Should be > > download = URL("default", "download", args=p.pdf) > > You can do that on the view. But the

Re: [web2py] _href to URL()

2018-02-25 Thread Anthony
On Sunday, February 25, 2018 at 7:57:22 PM UTC-5, 黄祥 wrote: > > @anthony, tested your code but the result is not expected, it's added > another a href > *usually use in response.menu :* > (T('Address'), False, URL('master', 'address'), [] ), > *result:* > Address > > *change into :* >

[web2py] Re: cache response.render in views

2018-02-25 Thread Anthony
On Sunday, February 25, 2018 at 7:26:52 PM UTC-5, 黄祥 wrote: > > pardon, is this function is cached? on which side database, views, or > function? > *modules/test_report.py* > @cache.action(time_expire = cache_time_expire, cache_model = cache_model, > quick = cache_quick, prefix = cache_prefix)

Re: [web2py] embed a pdf

2018-02-25 Thread Marco Mansilla
Take a look to this https://groups.google.com/forum/m/#!topic/web2py/qgmh5C0XXkY El 26 feb. 2018 03:36, "Martin Weissenboeck" escribió: > Sorry, it does not work. > The same results with or without "default" > > 2018-02-26 4:20 GMT+01:00 Marco Mansilla

[web2py] Re: cache response.render in views

2018-02-25 Thread 黄祥
pardon, is this function is cached? on which side database, views, or function? *modules/test_report.py* @cache.action(time_expire = cache_time_expire, cache_model = cache_model, quick = cache_quick, prefix = cache_prefix) *# cache function, isn't it?* def report_0(cache_db, print_controller):

Re: [web2py] Error using Postgres

2018-02-25 Thread Massimo Di Pierro
If it finds psycopg2 it should be using it over pg8000. Is t possible you have two versions of python installed? On Sunday, 25 February 2018 04:46:57 UTC-6, Morganti wrote: > > Hi Massimo, thanks your answer. > > How can force web2py uses psycop2? I install pyscop2 using pip and made a > test

Re: [web2py] Re: accessing Exchange IMAP email

2018-02-25 Thread Massimo Di Pierro
I am telling you not to use DAL('imap://...') any more. If you need to use imap, use imaplib https://docs.python.org/2/library/imaplib.html We are no longer supporting imap as part of the DAL. Nobody was using it and it is not the right abstraction. On Sunday, 25 February 2018 03:02:44 UTC-6,

Re: [web2py] embed a pdf

2018-02-25 Thread Martin Weissenboeck
Did not solve the problem. The pdf data is stored in the table (it can be retrieved manually). The question is how to show the pdf in an iframe or an embed field. 2018-02-26 8:00 GMT+01:00 Marco Mansilla : > Take a look to this > >

Re: [web2py] Re: accessing Exchange IMAP email

2018-02-25 Thread andfae
I'm sorry, but what are you telling me exactly? 2018-02-25 3:33 GMT+01:00 Massimo Di Pierro : > I believe we dropped support of DAL('imap:...) > > > On Wednesday, 21 February 2018 10:41:40 UTC-6, Andrea Fae' wrote: >> >> I have an exchange server and usually I access

Re: [web2py] _href to URL()

2018-02-25 Thread 'Annet' via web2py-users
Hi Joel, Thanks for your reply. This works: ('', False, A('TaC', _href='https://static.domain.com/files/Terms_and_Conditions.pdf', _target="_blank", vars=dict(attachment=True))) For some reason the first attribute is not used as the link text. Kind regards, Annet -- Resources: -

Re: [web2py] Error using Postgres

2018-02-25 Thread Morganti
Hi Massimo, thanks your answer. How can force web2py uses psycop2? I install pyscop2 using pip and made a test importing it in normal python shell. But I got the same error when tried to execute the same function: ((u'ERROR', u'34000', u'portal "pg8000_portal_294" does not exist',

[web2py] Re: cache response.render in views

2018-02-25 Thread Anthony
On Friday, February 23, 2018 at 10:29:32 PM UTC-5, 黄祥 wrote: > > according to book : > http://web2py.com/books/default/chapter/29/04/the-core?search=response.render, > > the response.render is used in controllers, let say, my controller is > contain nested loop and i decide to put it on views,

Re: [web2py] _href to URL()

2018-02-25 Thread Anthony
On Sunday, February 25, 2018 at 5:25:51 AM UTC-5, Annet wrote: > > Hi Joel, > > Thanks for your reply. > > This works: > > ('', False, A('TaC', > _href='https://static.domain.com/files/Terms_and_Conditions.pdf', > _target="_blank", vars=dict(attachment=True))) > > For some reason the first