[web2py] pypdf sample code not working in a view

2014-11-06 Thread Mark Kirkwood
I have a web2py app that produces some html tabular output that I would like to optionally display as a pdf. Looking around it seems that pypdf is just the thing for this. I downloaded the sample app from https://code.google.com/p/pyfpdf/ and it works just fine. However it needs code in the c

[web2py] Re: Recent python -> native code compiler status (PyPy, Nuitka, Cython, Numba)?

2014-11-06 Thread JorgeH
I have to agree with 'nick name' here... there are some cases in which the developer wants to have control over the property of the code, at least until the client has paid. On Thursday, November 6, 2014 7:27:03 PM UTC-5, nick name wrote: > > On Thursday, November 6, 2014 5:26:28 PM UTC+2, Leone

[web2py] Re: CAS not working - redirect loop

2014-11-06 Thread Massimo Di Pierro
Will try this asap. On Thursday, 6 November 2014 13:00:13 UTC-6, Srini K wrote: > > I'm trying to get CAS auth working but it is giving problems. Below is my > setup. > > 1. Environment is Ubuntu+Apache+Web2py > 2. I have one web2py app that acts as a CAS provider. It exposes a > controller fun

[web2py] Re: conditional form feilds when using =form.custom.widget.begin

2014-11-06 Thread Massimo Di Pierro
Can you show us your form? Do you use {{=form.custom.widget[field]}} or . The latter is not supposed to work On Thursday, 6 November 2014 09:45:10 UTC-6, Jeremiah Peterson wrote: > > in my controller I have > > db.news.link.show_if = (db.news.category==1) > > In my view if I just use {{=form

[web2py] edit buttons within FOR loop

2014-11-06 Thread Alex Glaros
are there examples of edit buttons within FOR loop as I inserted in the Reddit-Clone example below? {{extend 'layout.html'}} Comments for {{=A(news.title,_href=news.link)}} {{if auth.user:}} {{=news.votes}} plus minus {{=form}} {{pass}} {{for comment in comments:}} {{=comment.p

Re: [web2py] web2py + OSM (OpenStreetMap) integration?

2014-11-06 Thread nick name
On Friday, November 7, 2014 12:00:45 AM UTC+2, Manuele wrote: > > > well maybe the best option is to use the openlayers library... include > > an openstreetmap layer is quite easy but can you be more specific about > > what you need? > > > > Are theese example enought for your needs? > > htt

[web2py] Re: Recent python -> native code compiler status (PyPy, Nuitka, Cython, Numba)?

2014-11-06 Thread nick name
On Thursday, November 6, 2014 5:26:28 PM UTC+2, Leonel Câmara wrote: > > Frankly I have no interest in making my code harder to decompile or not > delivering the code, it's protected by copyright and usually I sell the > costumer projects that they paid to develop so I find it ethically wrong >

[web2py] Re: populate form with just-submitted values

2014-11-06 Thread Leonel Câmara
FORM has keepvalues=True, you can pass attributes to SQLFORM or SQLFORM.factory and if they aren't options for SQLFORM they're passed to the form. So really all you have to do is add keepvalues=True. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/

[web2py] Re: Asynchronous Background Processes

2014-11-06 Thread JorgeH
what about assign that to run a script in scheduler to do that task in the background.. On Thursday, November 6, 2014 6:40:46 PM UTC-5, Tim Richardson wrote: > > > > On Thursday, 6 November 2014 03:47:24 UTC+11, Josh L wrote: >> >> Thanks Niphlod - I appreciate the input and am definitely op

[web2py] Re: Asynchronous Background Processes

2014-11-06 Thread Tim Richardson
On Thursday, 6 November 2014 03:47:24 UTC+11, Josh L wrote: > > Thanks Niphlod - I appreciate the input and am definitely open to > suggestions. I'm only running with Rocket right now but of course will be > moving to a production server at some point. In my testing using > multiprocessing to

[web2py] Re: Refresh DIV onclick

2014-11-06 Thread Tim Richardson
On Friday, 7 November 2014 09:19:40 UTC+11, Tim Richardson wrote: > > At first glance it seems to me that you should use LOAD components on the > page. Read that chapter. You will process answers via Ajax (web2py > submits a LOAD form via Ajax automatically). You can refresh the div when >

[web2py] Re: Is it easy to create a grid data entry form using web2py?

2014-11-06 Thread Tim Richardson
On Wednesday, 4 June 2014 01:03:43 UTC+10, Chris Green wrote: > > LaDarrius Stewart > wrote: > > [-- text/plain, encoding quoted-printable, charset: UTF-8, 52 lines --] > > > > Like this? > > > http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javas

[web2py] Re: Is it easy to create a grid data entry form using web2py?

2014-11-06 Thread Massimo Di Pierro
web2py comes with this: http://www.web2py.com/init/spreadsheet/index On Tuesday, 3 June 2014 07:25:19 UTC-5, c...@isbd.net wrote: > > This may be trying to run before I can walk but never mind! :-) > > Is it easy to create a grid type table editing form in web2py? I just > want an easy way to

[web2py] Re: Refresh DIV onclick

2014-11-06 Thread Tim Richardson
At first glance it seems to me that you should use LOAD components on the page. Read that chapter. You will process answers via Ajax (web2py submits a LOAD form via Ajax automatically). You can refresh the div when your processing of answers is complete. -- Resources: - http://web2py.com -

[web2py] Re: Refresh DIV onclick

2014-11-06 Thread Tim Richardson
At first glance it seems to me that you should use LOAD components on the page. Read that chapter. You will process answers via Ajax (web2py submits a LOAD form via Ajax automatically). You can refresh the div when your processing of answers is complete. -- Resources: - http://web2py.com -

[web2py] conditional form feilds when using =form.custom.widget.begin

2014-11-06 Thread Jeremiah Peterson
in my controller I have db.news.link.show_if = (db.news.category==1) In my view if I just use {{=form}} then it will only show the 'link' field if the category field is set to 1. However if I use {{=form.custom.begin}} so can I can place my form fields in the order I want, it doesn't make

[web2py] Re: How does web2py uses the auth_tables, while authenticating using ldap (cn).

2014-11-06 Thread Dennis Jacobs
Hi Niphlod, First of all i wanted to thank you for your fast reply. And I was aware of the fact that web2py doesn't "write" to the ldap-directive, which is actually what i'm trying to implement. Now after some testing, i've noticed that a user has to be a member of a certain group in order to l

[web2py] CAS not working - redirect loop

2014-11-06 Thread Srini K
I'm trying to get CAS auth working but it is giving problems. Below is my setup. 1. Environment is Ubuntu+Apache+Web2py 2. I have one web2py app that acts as a CAS provider. It exposes a controller function and have tried both form=auth.login() and form=auth(). 3. I have another web2py app that

[web2py] populate form with just-submitted values

2014-11-06 Thread John Lofgren
I'd like to have a form to enter several filter criteria for a database query. After I submit the form (self-submit to the same controller), I would like the form to be pre-populated with the values that I just submitted. So the form will always show what the current filter criteria are. I hav

[web2py] Re: Asynchronous Background Processes

2014-11-06 Thread Josh L
Thanks Niphlod - I appreciate the input and am definitely open to suggestions. I'm only running with Rocket right now but of course will be moving to a production server at some point. In my testing using multiprocessing to pull all 20 images at the same time is about 5-6 times faster than one

Re: [web2py] web2py + OSM (OpenStreetMap) integration?

2014-11-06 Thread Manuele Pesenti
Il 06/11/14 20:37, Manuele Pesenti ha scritto: > Il 06/11/14 12:39, nick name ha scritto: >> Is there an example of using web2py together with OSM, similar to the >> google maps examples? >> >> Or some application I can look at and learn from? >> >> (I'm not a Google Maps or OSM expert, just need t

[web2py] Re: CSV import in LOAD does not work

2014-11-06 Thread Richard D
Thank you, I'll implement it. For the time being I open a new tab in the browser, but the component solution is better because I need to update the page from which it is triggered. On Thursday, November 6, 2014 8:35:22 PM UTC+1, Leonel Câmara wrote: > > Yeah it only changes stuff for forms that

Re: [web2py] web2py + OSM (OpenStreetMap) integration?

2014-11-06 Thread Manuele Pesenti
Il 06/11/14 12:39, nick name ha scritto: > Is there an example of using web2py together with OSM, similar to the > google maps examples? > > Or some application I can look at and learn from? > > (I'm not a Google Maps or OSM expert, just need to add a small map + > markers to an app) > > Thanks wel

[web2py] Re: CSV import in LOAD does not work

2014-11-06 Thread Leonel Câmara
Yeah it only changes stuff for forms that have file inputs. -- 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 subs

[web2py] Re: CSV import in LOAD does not work

2014-11-06 Thread Richard D
Leonel, Thank you for the quick answer, I'll try to implement this. I assume this will not touch the other form handling in components. Richard D On Thursday, November 6, 2014 7:34:36 PM UTC+1, Richard D wrote: > > Dear all, > > I am making a csv import function but encounter a strange differ

[web2py] Re: CSV import in LOAD does not work

2014-11-06 Thread Leonel Câmara
Uploads don't work in ajax loaded forms without some trickery. Here's a possible solution You need jquery.form.js then you need to put something like this javascript right after web2py.js is loaded, this will change the default way web2py traps forms so it deals

[web2py] CSV import in LOAD does not work

2014-11-06 Thread Richard D
Dear all, I am making a csv import function but encounter a strange difference between the function in a html page and a LOAD. The import in the HTML page works fine, the in the LOAD not. In the controller I have: current_rec=get_current_rec(session.sif.id, session.dim.id) if get_lower

Re: [web2py] Re: Audio wav file

2014-11-06 Thread 'FERNANDO VILLARROEL' via web2py-users
Hi. The follow script it works; Your browser does not support the audio element. And this works in Firefox but not in Chrome, why?. I am use latest version of firefox and Chrome. But my problem is that the wav file is a variable,so i try to use: f='{{=filename}}' But i received a except

[web2py] Re: Refresh DIV onclick

2014-11-06 Thread LoveWeb2py
Did anyone have an alternative? On Thursday, October 16, 2014 12:08:18 AM UTC-4, LoveWeb2py wrote: > > UPDATE: This works well for me after the form submits: redirect( > request.env.http_web2py_component_location,client_side=True) > > That came straight from the book, but its when the student get

[web2py] Re: web2py + OSM (OpenStreetMap) integration?

2014-11-06 Thread Ron McOuat
To do this on the server in Python this might help http://wiki.openstreetmap.org/wiki/Osmapi I haven't used it myself but starting to look at this for an application. On Thursday, 6 November 2014 03:39:55 UTC-8, nick name wrote: > > Is there an example of using web2py together with OSM, similar

[web2py] Re: Recent python -> native code compiler status (PyPy, Nuitka, Cython, Numba)?

2014-11-06 Thread Leonel Câmara
Frankly I have no interest in making my code harder to decompile or not delivering the code, it's protected by copyright and usually I sell the costumer projects that they paid to develop so I find it ethically wrong not to give them the code. Besides, there aren't that many programmers willing

Re: [web2py] web2py + OSM (OpenStreetMap) integration?

2014-11-06 Thread Carlos Cesar Caballero Díaz
I play with leaflet some time ago, and it looks like a good choice. It is javascript based, and very easy to integrate in any web app. El 06/11/14 06:39, nick name escribió: Is there an example of using web2py together with OSM, similar to the google maps examples? Or some application I can

[web2py] Re: Recent python -> native code compiler status (PyPy, Nuitka, Cython, Numba)?

2014-11-06 Thread nick name
On Thursday, November 6, 2014 4:12:01 PM UTC+2, Leonel Câmara wrote: > > Does any of them eventually let you pack the app in a native executable >> that does not include the source code of the app? (not even compiled byte >> code) >> > > Don't use python if you don't want to give out source code.

[web2py] Re: Recent python -> native code compiler status (PyPy, Nuitka, Cython, Numba)?

2014-11-06 Thread Leonel Câmara
> > Does any of them eventually let you pack the app in a native executable > that does not include the source code of the app? (not even compiled byte > code) > Don't use python if you don't want to give out source code. -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

[web2py] Re: Recent python -> native code compiler status (PyPy, Nuitka, Cython, Numba)?

2014-11-06 Thread Niphlod
pypy runs fine. It's one of our CI environments. As for other distribution, I really can't say anthing about. Just try it On Thursday, November 6, 2014 12:46:10 PM UTC+1, nick name wrote: > > I remember PyPy was able to run web2py apps in the past. Is this still the > case? > > Did anyone tr

[web2py] Re: Disable an app in v1.61.1?

2014-11-06 Thread Willoughby
Awesome! Thanks Simone. On Wednesday, November 5, 2014 5:17:02 PM UTC-5, Niphlod wrote: > > super-easy. > put this in a model of the app you want to disable (preferably the very > first model, or create a 0_a.py) > > raise HTTP(503, "Temporarily down for > maintenance") > > you got the gist

[web2py] Re: no basic auth via wget because current.request.env.http_authorization is none

2014-11-06 Thread Falko Delarue
wget --user he...@gmail.com --password test1234 -q -O- http://test.com/testing/pages/list_pages On Tuesday, November 4, 2014 9:57:20 AM UTC+1, Niphlod wrote: > > how do you call wget ? > > On Monday, November 3, 2014 11:51:34 PM UTC+1, Falko Delarue wrote: >> >> wget and the browser http://email

[web2py] Recent python -> native code compiler status (PyPy, Nuitka, Cython, Numba)?

2014-11-06 Thread nick name
I remember PyPy was able to run web2py apps in the past. Is this still the case? Did anyone try to run web2py apps under Nuitka, Cython or Numba? Was it successful? Was there an observable speed difference? Does any of them eventually let you pack the app in a native executable that does not i

[web2py] web2py + OSM (OpenStreetMap) integration?

2014-11-06 Thread nick name
Is there an example of using web2py together with OSM, similar to the google maps examples? Or some application I can look at and learn from? (I'm not a Google Maps or OSM expert, just need to add a small map + markers to an app) Thanks -- Resources: - http://web2py.com - http://web2py.com/b

[web2py] Re: Support for MS Access?

2014-11-06 Thread ksotiris
I have write an adapter making this addition in dal.py line 116: 'msaccess://DRIVER={Microsoft Access Driver(*.mdb)};UID=user;PWD=pass; DBQ=database line 371: try: import odbtp DRIVERS.append('MSACCESS(odbtp)') LOGGER.warning('Msaccess with odbtp support is experimen