[web2py] retrieval of data from android device and adding it to database through gprs connection

2016-09-20 Thread karthik naidu
hi, i'm new to web2py. I'm making an app to track positions of an android device. how to recieve data from android device and store it in my database. thanks in advance. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: How to not return ticket issue HTML but a custom error?

2016-09-20 Thread Anthony
On Tuesday, September 20, 2016 at 11:22:34 AM UTC-4, Ty oc wrote: > > I mean, we have other web2py apps there, I dont want to modify the default > behaviour of the other ones, only this "backend" app. > > El martes, 20 de septiembre de 2016, 10:06:10 (UTC-5), Ty oc escribió: >> >> I thought it

[web2py] Re: How to not return ticket issue HTML but a custom error?

2016-09-20 Thread Anthony
> > routes_onerror = [ > ('init/400', '/backend/default/index'), > ('init/*', '/backend/default/index'), > ('*/404', '/backend/default/index'), > ('*/*', '/backend/error/report') > ] > > > > I have as response this HTML instead of the json > > >

[web2py] Re: How to not return ticket issue HTML but a custom error?

2016-09-20 Thread Anthony
On Tuesday, September 20, 2016 at 12:20:48 PM UTC-4, Ty oc wrote: > > Well also now I got it (still not per app)... but the problem Im having is > that I want to return a *json*, but Im getting the full HTML response > with a body and all that. > > If I use > > error_handler =

[web2py] Re: Passing a list as query parameter and storing the retrieved rows in a list

2016-09-20 Thread villas
Maybe you could better use more of the power of web2py. Something like this? s = db( db.item.id.belongs(getcourseids.values()) ).select( db.item.course_title).as_list() or perhaps a bit longer, something like this... rows = db( db.item.id.belongs(getcourseids.values())

[web2py] Re: How to not return ticket issue HTML but a custom error?

2016-09-20 Thread Dave S
On Tuesday, September 20, 2016 at 9:20:48 AM UTC-7, Ty oc wrote: > > Well also now I got it (still not per app)... > Well, the book says routes_onerror can specify a global mapping, an app mapping, an error code mapping, or app+err.

[web2py] Re: How to not return ticket issue HTML but a custom error?

2016-09-20 Thread Dave S
On Tuesday, September 20, 2016 at 9:20:48 AM UTC-7, Ty oc wrote: > > Well also now I got it (still not per app)... but the problem Im having is > that I want to return a *json*, but Im getting the full HTML response > with a body and all that. > Are you setting content type to json? That

[web2py] Re: email message composition

2016-09-20 Thread Dave S
On Tuesday, September 20, 2016 at 10:48:06 AM UTC-7, Pierre wrote: > > thanks guys > > now works like a charm > > I just mispelled the view name..(error_level=3, exitcode=56242) > > Jim's number 3 does the job : > > response.render('message.html', context) > > Glad to hear it's working for

[web2py] Re: scheduler and long tasks

2016-09-20 Thread Pierre
thanks Niphlod right now coordination isn't a problem... I have 2 workers and they seem to cooperate well. -- 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

[web2py] Re: email message composition

2016-09-20 Thread Pierre
thanks guys now works like a charm I just mispelled the view name..(error_level=3, exitcode=56242) Jim's number 3 does the job : response.render('message.html', context) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: How to not return ticket issue HTML but a custom error?

2016-09-20 Thread Ty oc
Well also now I got it (still not per app)... but the problem Im having is that I want to return a *json*, but Im getting the full HTML response with a body and all that. If I use error_handler = dict(application='backend', controller='error',

[web2py] Re: Scheduler task runs before it is supposed to run

2016-09-20 Thread Bernardo Leon
Thank you for your reply. Can you reply this thread when the fix is published? I don't know if this is related to the same bug but in my worker process terminal I have this message: ERROR:web2py.scheduler.cedia-Satellite-L55-C#18606:error popping tasks why do I have this error? Thanks.

[web2py] Re: How to not return ticket issue HTML but a custom error?

2016-09-20 Thread Ty oc
I mean, we have other web2py apps there, I dont want to modify the default behaviour of the other ones, only this "backend" app. El martes, 20 de septiembre de 2016, 10:06:10 (UTC-5), Ty oc escribió: > > I thought it was a per app configuration. > > El lunes, 19 de septiembre de 2016, 17:51:28

[web2py] Re: How to not return ticket issue HTML but a custom error?

2016-09-20 Thread Ty oc
I thought it was a per app configuration. El lunes, 19 de septiembre de 2016, 17:51:28 (UTC-5), Anthony escribió: > > routes.py goes in the root /web2py folder. Be sure to restart the server > or reload routes (via admin). Also, make sure you don't actually have an > error somewhere in your

Re: [web2py] Re: field in list test

2016-09-20 Thread Yoel Benitez Fonseca
Thanks Anthony ... I'm sorry say but can not remember for what i needed that code snippet thanks any way.. is good to know that stuff. 2016-09-16 17:02 GMT-04:00 Anthony : > This is a quirk of Field objects. Field inherits from Expression, and the > __eq__ method of

Re: [web2py] Re: Alternative IDEs?

2016-09-20 Thread Yoel Benitez Fonseca
Atom +1 El sep 19, 2016 9:56 AM, "Philip Kilner" escribió: > Hi, > > On 19/09/16 12:36, Jurgis Pralgauskis wrote: > >> What are people mostly using for W2P dev? >> > > I'm currently using Atom and Cloud 9. > > To be honest, I'm getting on better with Cloud 9, but need to

[web2py] Re: email message composition

2016-09-20 Thread Jim S
I always create HTML emails. I've used 3 different methods over the years. 1. Write the HTML using python string formatting 2. Use the Python Dominate package to build the HTML strings - https://github.com/Knio/dominate 3. Use web2py templating -

[web2py] Re: email message composition

2016-09-20 Thread Anthony
Hard to say without seeing an example. With Python string formatting, you can used named placeholders and fill them with a dictionary. Alternatively, you could use a web2py template (either stored in a "view" file or simply as a string in your code). If you want to build an HTML email, you

[web2py] email message composition

2016-09-20 Thread Pierre
Hi, Trying to make a task compose email messages including variables I don't see a "natural" way to handle this via string manipulation. Is there an alternative solution ? what's the preferred/standard form for simple emails: html, xml, text ? -- Resources: - http://web2py.com -

[web2py] Extending LDAP Authentication with "Whitelist"

2016-09-20 Thread Scott ODonnell
All , I need to authenticate users against , LDAP , which I have working. I need to also check the username against a simple whitelist.txt file before allowing access. Where / how is the proper way to implement this? I currently have some logic in a function called ldap_connect that is