Re: [web2py] Re: pysqlite2.dbapi2.OperationalError'> near "<": syntax error

2016-09-19 Thread Peter
The double db reference was definitely part of the problem but wasn't the whole story. I made a mistake in one of the field names... specifically AND (task.*task_status* = 'BILLABLE') should have been AND (task.*payment_status*="BILLABLE")); I actually had it correct in the SQL

[web2py] Re: Rethinkdb on Web2py

2016-09-19 Thread JorgeH
any plans to a rethinkdb adapter to DAL in the foreseeable future? On Monday, July 25, 2016 at 12:50:25 PM UTC-5, Oasis Agano wrote: > > Is there a way of using rethinkdb on web2py framework > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Translation best practice

2016-09-19 Thread pbreit
Should be easy to spot a missing ' with any syntax hiliter. On Monday, September 19, 2016 at 2:42:31 PM UTC-7, icodk wrote: > > Thanks This is of corse an option. The problem with sending such a file > is that the translator could forget a ' and this will cause some problems. > I was hoping

[web2py] advice for a restful app

2016-09-19 Thread JorgeH
Hello I am prototyping an app in web2py. My plan is to offer some software as saas. My question is , for the sake of having the more users (hundreds or thousands) while in production, should I rewrite the app later in say falcon.. and use a js framework for frontend.. or should I stick with

[web2py] Setting computed values to fields based on a reference field in the same form

2016-09-19 Thread Oasis Agano
Im trying to create a payslip form where the user will select the contract and the form will execute calculation formula based on a selected combobox but i dont know where to put the formula and the conditions any way of guiding me? the controller def addpayslip(): form =

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

2016-09-19 Thread Anthony
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 error handling app. On Monday, September 19, 2016 at 5:02:11 PM UTC-4, Ty oc wrote: > > Where exactly I need to put this

[web2py] Re: Translation best practice

2016-09-19 Thread icodk
Thanks This is of corse an option. The problem with sending such a file is that the translator could forget a ' and this will cause some problems. I was hoping for something more robust similar to what you get when you use the admin interface. May be it is possible (I am thinking laud) to

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

2016-09-19 Thread Ty oc
Where exactly I need to put this file? I have tried error_message = '%s---' error_message_ticket = '''Internal error Ticket issued: %(ticket)s--''' routes_onerror = [ ('init/400', '/backend/default/index'), ('init/*', '/backend/default/index'), ('*/404',

Re: [web2py] Re: Alternative IDEs?

2016-09-19 Thread António Ramos
Sublime https://bitbucket.org/kfog/w2p , It gives me the web2py console. Very nice!! 2016-09-19 16:46 GMT+01:00 Ron Chatterjee : > Wing IDE and don't look back > > > On Monday, September 19, 2016 at 9:56:07 AM UTC-4, Philip Kilner wrote: >> >> Hi, >> >> On 19/09/16

Re: [web2py] Re: pysqlite2.dbapi2.OperationalError'> near "<": syntax error

2016-09-19 Thread Anthony
OK, got it. You are passing a Set object where you should have a Query object. You have: query = db(...) and then you have: rows = db(query).select(...) which is equivalent to: rows = db(db(...)).select(...) which is not allowed. When the Set object is passed to db(), it is converted to a

[web2py] Re: scheduler and long tasks

2016-09-19 Thread Niphlod
nope. Technically, tasks are queued as long as the "outer" thingy (be it whatever) get all of the pending transactions committed (a task IS queued when the corresponding "insert" is committed to the database). Every task gets processed according by the usual rules, but if you want coordination

[web2py] Re: scheduler and long tasks

2016-09-19 Thread Pierre
so far works :) is there any restriction to queueing_task inside of a task ? is every task independant from the other tasks ? (any hierarchical relation between "inner tasks" and "outer tasks" ?) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: pysqlite2.dbapi2.OperationalError'> near "<": syntax error

2016-09-19 Thread Peter
Error after changing .select()to._select() Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Traceback (most recent call last): File "/home/peter/web2py/gluon/restricted.py", line 227, in restricted exec ccode in environment File

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

2016-09-19 Thread Niphlod
sorry, a bug slipped in. In the wait for the fix, please use next_run_time in addition to start_time. On Monday, September 19, 2016 at 6:27:28 PM UTC+2, Bernardo Leon wrote: > > Hi, I am trying to run tasks in the future based on a time the user > specifies but as soon as the task is queued it

[web2py] Invalid login is shown when social login is used along the normal login(Auth)

2016-09-19 Thread @brooks
I have implemented social login along with the normal login(Auth).When I try to login through the normal login form,it shows invalid login(for the registered users).Also,when I login through the other method(social login),I am not getting redirected to the index page.I have provided the

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

2016-09-19 Thread Meinolf
Hi There, When i test the code below, for a list that is supposed to have multiple items, i only get one result for the last item, did i miss something in the for loop or anywhere else? for i in range(0, (len(getcourseids)-1)): c = db.item.id==getcourseids[i].item_id

Re: [web2py] extracting a field value from a row gives me

2016-09-19 Thread Meinolf
Thanks, I solved it with: query = (db.rates.item_id==request.args(0)) & ~(db.rates.user_id==auth.user.id) results = db(query).select(db.rates.user_id, orderby=~db.rates.clicks) maxrating = results[0].user_id i can now use maxrating for my query. On Monday, September

Re: [web2py] Re: pysqlite2.dbapi2.OperationalError'> near "<": syntax error

2016-09-19 Thread Anthony
Replace .select() with ._select() and print/output the result so we can see the exact SQL generated. On Monday, September 19, 2016 at 11:53:49 AM UTC-4, Peter wrote: > > Thanks for your response Anthony! > > I have obviously misunderstood a reference I read somewhere saying that > reference

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

2016-09-19 Thread Bernardo Leon
Hi, I am trying to run tasks in the future based on a time the user specifies but as soon as the task is queued it is executed, what am I doing wrong? I am using web2py Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 This is my model.db (part of it) db =

Re: [web2py] Re: pysqlite2.dbapi2.OperationalError'> near "<": syntax error

2016-09-19 Thread Peter Errity
Thanks for your response Anthony! I have obviously misunderstood a reference I read somewhere saying that reference fields were given special attributes and gave an example something like db.fieldname.name I assumed the trailing .name came from the referenced table attributes. So I have modified

Re: [web2py] Re: Alternative IDEs?

2016-09-19 Thread Ron Chatterjee
Wing IDE and don't look back On Monday, September 19, 2016 at 9:56:07 AM UTC-4, Philip Kilner wrote: > > 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

[web2py] Re: Web2py Solr UI

2016-09-19 Thread Ron Chatterjee
Thank you Massimo. Learn something new Everyday! On Sunday, September 18, 2016 at 11:01:09 PM UTC-4, Massimo Di Pierro wrote: > > The build_query is not efficient. It uses the LIKE operator therefore it > does not uses proper full text search. > Full text search builds an index of keywords and

[web2py] Re: replaced by × in url

2016-09-19 Thread Gael Princivalle
Thank you all. Yes Anthony I was testing the url returning it from a function and displaying it directly from the function url in the browser. URL is correct, sorry for that. Il giorno lunedì 19 settembre 2016 16:35:57 UTC+2, Anthony ha scritto: > > Where/how are you using the resulting url

[web2py] Re: replaced by × in url

2016-09-19 Thread Anthony
Where/how are you using the resulting url variable. It looks like you are displaying it (unescaped) directly as HTML, in which case, "" is treated as the HTML entity name for the multiplication sign. It should work if you just let web2py escape it, though we may need to see more code. See

[web2py] Re: pysqlite2.dbapi2.OperationalError'> near "<": syntax error

2016-09-19 Thread Anthony
First, note that the following is not doing what you think it is: rows=db(query).select(db.task.person, db.task.person.name, ...) db.task.person is a Field object, and it's "name" attribute is just the string name of the field itself, so the above is equivalent to:

[web2py] Re: replaced by × in url

2016-09-19 Thread Niphlod
what version are you using ? can you try starting a shell and doing this ? >>> URL(vars=dict(loc='foo', timestamp='bar')) my output is '/welcome/default/index?loc=foo=bar' On Monday, September 19, 2016 at 3:31:17 PM UTC+2, Gael Princivalle wrote: > > Hello. > > When I build this URL: > url

Re: [web2py] Re: Alternative IDEs?

2016-09-19 Thread Philip Kilner
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 the paid version for my use case. It looks as though I will go for that and go 100% Chromebook

[web2py] Re: optgroup support

2016-09-19 Thread quesada . ostos
Hola, aquí la solución. Es fácil. selectnombre = SELECT(OPTGROUP(*opcions, _label="grupo"), _name="selNombre", _id="selNombre", _multiple="multiple") Saludos!! El lunes, 15 de febrero de 2010, 10:19:18 (UTC+1), hamdy.a.farag escribió: > > Hi > > I read this post >

[web2py] replaced by × in url

2016-09-19 Thread Gael Princivalle
Hello. When I build this URL: url = URL('/maps/api/timezone/json', scheme='https', host= 'maps.googleapis.com', vars=dict(key='mykey', location=str(events_latitude) + ',' + str(events_longitude), timestamp=str(today_UTC_timestamp))) "" is replaced by "×":

[web2py] Re: extracting a field value from a row gives me

2016-09-19 Thread Anthony
On Monday, September 19, 2016 at 2:21:09 AM UTC-4, Meinolf wrote: > > What could be wrong with my code below? > > sim = db((db.rates.item_id==request.args(0)) & ~(db.rates.user_id== > auth.user.id)).select(db.rates.clicks.max()).first().clicks > When you use db.rates.clicks.max(), the resulting

Re: [web2py] Re: Alternative IDEs?

2016-09-19 Thread Kiran Subbaraman
Base Eclipse (just the "Platform Runtime Binary") with Pydev. I import Web2py as a python project, and reference it from other development projects. Makes it easy to browse code, and also (if really required) to run the app+web2py in debug mode and debug from within eclipse. Works fine for

[web2py] Re: Alternative IDEs?

2016-09-19 Thread Jurgis Pralgauskis
Hi, I would like tu wake the topic up :) What are people mostly using for W2P dev? >From free (unpaid) alternatives I found mentioned - Sublime https://bitbucket.org/kfog/w2p (not sure about debug?) - PyCharm Community edition populate projects with fake imports - Aptana (PyDev) ? - VS

Re: [web2py] extracting a field value from a row gives me

2016-09-19 Thread Kiran Subbaraman
Check the structure of your returned result. Does it have 'clicks' as a first-level attribute? Or should it be 'rates.clicks'? Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Mon, 19-09-2016 11:51 AM, Meinolf wrote: What could be wrong with

[web2py] extracting a field value from a row gives me

2016-09-19 Thread Meinolf
What could be wrong with my code below? sim = db((db.rates.item_id==request.args(0)) & ~(db.rates.user_id==auth.user.id)).select(db.rates.clicks.max()).first().clicks I need to access the value of the field *clicks* so that i can use it as a parameter in another query. It keeps giving me --