Re: [web2py] how to get count (number of records) from grid.element('.web2py_counter')

2015-10-02 Thread Niphlod
for anyone's sake, do it client side On Friday, October 2, 2015 at 7:38:50 AM UTC+2, Alex Glaros wrote: > > Thanks Vinicius, > > it worked. > > if it couldn't find the value, it raised this error: > > list index out of range > > Is the below way acceptable way of preventing the error

[web2py] Re: Running threads in Scheduler process

2015-10-02 Thread Niphlod
techinically any scheduler worker is a fresh process spawned with multiprocessing.Process, so spawning a thread, albeit counterproductive, is allowed. I'm not that sure that launching a process from inside a spawned process play wells with input/output buffers. In any case, using

[web2py] Re: scheduled task not committing

2015-10-02 Thread Leonel Câmara
That's fine Jeremy there's no issue here. "In models, views and controllers there is no need to ever call commit or rollback explicitly." There's no scheduler mentioned there. Do note that this is also in the documentation: Remember to call db.commit() at the end of every task if it involves

Re: [web2py] how to get count (number of records) from grid.element('.web2py_counter')

2015-10-02 Thread Vinicius Assef
Hi Niphlod. :-) Why would it be better at client side? -- Vinicius Assef On 2 October 2015 at 03:34, Niphlod wrote: > for anyone's sake, do it client side > > > On Friday, October 2, 2015 at 7:38:50 AM UTC+2, Alex Glaros wrote: >> >> Thanks Vinicius, >> >> it

[web2py] Re: IS_IN_DB validation error

2015-10-02 Thread Anthony
Note, it is actually the first argument that must be a Set object (or a DAL) object. The second argument must be a Field object or a string representation of a field in 'tablename.fieldname' format. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] CORS and raise HTTP()

2015-10-02 Thread Anthony
Should be: raise HTTP(404, **response.headers) Anthony -- 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

[web2py] Re: Wizard inside a LOAD

2015-10-02 Thread Jose
> For now the proposed fix/workaround is to pass an explicit _action to the > FORM, which will prevail if explicitely found. > Its quite easy because _action=URL() gets things done pretty quickly and > painless. > > this has not worked -- Resources: - http://web2py.com -

[web2py] Hacktoberfest

2015-10-02 Thread Leonel Câmara
This may be a good time for you guys to start contributing to web2py and win a T-Shirt https://hacktoberfest.digitalocean.com/ There are a lot of open issues, contributing to web2py is a lot easier than it seems and I'm sure everyone here would be glad to help you guys completing your pull

[web2py] CORS and raise HTTP()

2015-10-02 Thread Kiran Subbaraman
Hello all, My javascript is making a CORS call to web2py; wherein I have set the following in my controller: response.headers['Content-Type'] = 'application/json; charset=utf-8' response.headers['Access-Control-Allow-Origin'] = '*' response.headers['Access-Control-Max-Age'] = 86400

[web2py] Re: Web2py celery plugin

2015-10-02 Thread Stefan van den Eertwegh
Hi Niphlod, Thanks for you answer. Why i am asking this is because i want to generate around 150 pdf's by weasyprint and per each pdf i want to queue a mail with it as an attachment. Could this be done by the build in web2py Scheduler? PS: i tried the scheduler, but it tries to use the

[web2py] Web2py celery plugin

2015-10-02 Thread Stefan van den Eertwegh
Hi all, Does anyone know when the web2py-celery plugin comes out? In the google code GIT it says last change sinds 2011. I need background processes running which are started by web2py. I tried redis (rq) with web2py but it gives me errors when passing database connection through the

[web2py] Re: Web2py celery plugin

2015-10-02 Thread Niphlod
I'd say you're loosing yourself in a glass of water. In order to schedule something, that something must work. If your "something" doesn't, it really doesn't matter what tool are you issuing commands to. On Friday, October 2, 2015 at 11:56:55 AM UTC+2, Stefan van den Eertwegh wrote: > > Hi

[web2py] Re: Web2py celery plugin

2015-10-02 Thread Niphlod
you won't ever get to start workers from web2py, either with the embedded scheduler, with rq or with celery.that's pretty much a requirement (being completely separated) PS: celery integration was done on a so old release of celery that it won't ever be production ready PS2: you don't

[web2py] Re: Lost Fomatting on new build

2015-10-02 Thread Leonel Câmara
I'm guessing the configuration of the webserver has something wrong related with the static folder. -- 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

[web2py] Re: Matplotlib

2015-10-02 Thread pang
You can also use this: http://mpld3.github.io/index.html If I understand correctly, once you provide some static libraries, you can serve your plots as plain html, or even json, in your views. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: update list:string type colum

2015-10-02 Thread Anthony
Without getting into a complicated hack, I think the best approach is just to select the record to get the current list, and then use Python to extend the original list before updating. Anthony On Thursday, October 1, 2015 at 9:44:56 PM UTC-4, arihant daga wrote: > > Hello, > I have my table

Re: [web2py] CORS and raise HTTP()

2015-10-02 Thread Kiran Subbaraman
Anthony, Thank you. That works. I thought this behaviour would have been there by default... or any idea, why not? Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Fri, 02-10-2015 7:07 PM, Anthony wrote: Should be: raise HTTP(404,

Re: [web2py] CORS and raise HTTP()

2015-10-02 Thread Anthony
HTTP is a generic exception that is not tied to the web2py environment -- therefore it doesn't know about response and response.headers. It is typically used to abort the current request processing and return a response immediately, so you would often want to ignore any existing

[web2py] Re: Lost Style when deploying

2015-10-02 Thread Dave S
On Thursday, October 1, 2015 at 6:44:55 PM UTC-7, Michael Messmer wrote: > > So I spun up the latest web2py source on a Fedora 22 build and when i goto > the url I get this. > > > Does anyone know why I can get to it but the formatting looks terrible? I > googled to no avail. > > Installed:

[web2py] Web2py/Apache accessible via multiple host names

2015-10-02 Thread Michael Suelmann
Hello, I'm running web2py 2.12.3-stable on Fedora 22 with apache-2.4.16, python-2.7.10 and use the following config lines for WSGI: WSGIDaemonProcess default display-name=%{GROUP} WSGIProcessGroup default WSGIScriptAlias /welcome /var/wsgi/web2py/wsgihandler.py/welcome WSGIScriptAlias /examples

[web2py] Interact Web2Py App with Android App Security

2015-10-02 Thread Fábio Filho
I'm sorry by my english How can i connect my android application in my web2py site using auth authentication (@auth.requires_login)? I need make a secure connection between them for example: Web2Py Side : @auth.requires_login() def get_examplet(): return "{'code':'0'}" Android

[web2py] How to make a copy of db for unittest

2015-10-02 Thread Maelle Taurand
Hello I'm trying unittest with web2py. I found this article : http://www.web2py.com/AlterEgo/default/show/260 It works only when the db is the current database (db object). I need help to make a copy of database in order to not run unittest on the real database ? Thanks for answers --

[web2py] how to send value with Field database use websocket?

2015-10-02 Thread Hanafi Desar
=== def proses_websoket(): xx = request.vars.x val = db(db.m_pasien.id == xx).select() websocket_send('http://127.0.0.1:', val, 'mykey!', 'mygroup') return "" === i want

[web2py] Re: IS_IN_DB validation error

2015-10-02 Thread 'DenesL' via web2py-users
Oops, thanks Anthony. It should be: IS_IN_DB(db(geo_item.f_collection_id == geo_collection.id ),...) Hope it helps. Denes On Friday, October 2, 2015 at 9:25:15 AM UTC-4, Anthony wrote: > >

[web2py] Re: Wizard inside a LOAD

2015-10-02 Thread Niphlod
tested and retested. it works. please inspect your form and see if the correct url is generated and put in the action attribute. On Friday, October 2, 2015 at 2:48:27 PM UTC+2, Jose wrote: > > > > >> For now the proposed fix/workaround is to pass an explicit _action to the >> FORM, which will

Re: [web2py] Re: How to demonstrate LOAD() working properly?

2015-10-02 Thread Tom Campbell
Ugh, this is not my week. I'm working on a complete sample app & will post it ASAP. Thanks, and sorry. On Fri, Oct 2, 2015 at 4:21 PM, pn wrote: > Hi, the link you posted shows a blank page. I think you may have > copy-pasted from inside an email that requires you to have

[web2py] Re: How to make a copy of db for unittest

2015-10-02 Thread Niphlod
what database are you using ? On Friday, October 2, 2015 at 11:06:29 PM UTC+2, Maelle Taurand wrote: > > > Hello > I'm trying unittest with web2py. I found this article : > http://www.web2py.com/AlterEgo/default/show/260 > > It works only when the db is the current database (db object). > > I

[web2py] Re: Web2py/Apache accessible via multiple host names

2015-10-02 Thread Niphlod
remove the double wsgiscriptalias. Or trade apache for nginx + uwsgi. Less headaches for everybody. On Friday, October 2, 2015 at 11:06:26 PM UTC+2, Michael Suelmann wrote: > > Hello, > > I'm running web2py 2.12.3-stable on Fedora 22 with apache-2.4.16, > python-2.7.10 and use the following

[web2py] Re: Interact Web2Py App with Android App Security

2015-10-02 Thread Niphlod
what authentication do you want to support ? web2py's default use session cookies, but you need to get to the login page and obtain one before hitting a protected page On Friday, October 2, 2015 at 11:06:25 PM UTC+2, Fábio Filho wrote: > > I'm sorry by my english > > How can i connect

[web2py] How to demonstrate LOAD() working properly?

2015-10-02 Thread Tom Campbell
I am working on a simplified single-page app demo. I think I have it working, but I'm not sure because I need to demonstrate that only part of the page is reloading. Most of the code is shown in this post:

[web2py] Re: How to demonstrate LOAD() working properly?

2015-10-02 Thread pn
Hi, the link you posted shows a blank page. I think you may have copy-pasted from inside an email that requires you to have been logged in, try visiting the link and copy-pasting from the browser URL. Or maybe provide the example of your app by uploading it to github/bitbucket. On Friday,

Re: [web2py] how to get count (number of records) from grid.element('.web2py_counter')

2015-10-02 Thread Niphlod
you don't waste any cpu on it, and your app won't break when grid code will eventually be changed to accomodate for new features and/or a much needed refactoring. Use the controller as a real controller and the view for the presentation/aestethic layer. On Friday, October 2, 2015 at 2:22:53 PM

Re: [web2py] CORS and raise HTTP()

2015-10-02 Thread Kiran Subbaraman
Ok, I understand this better now. Thanks. Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Fri, 02-10-2015 11:33 PM, Anthony wrote: HTTP is a generic exception that is not tied to the web2py environment -- therefore it doesn't know about