[web2py] Re: Use reserved Keyword 'response'

2017-05-12 Thread Francisco García
El jueves, 11 de mayo de 2017, 19:53:29 (UTC+2), Anthony escribió: > > Please show your code. > Hi Anthony, Thanks for your answer. My code is: - @request.restful() def getOrder(): response.view = 'generic.json' def GET(*args,**vars):

[web2py] Re: Use reserved Keyword 'response'

2017-05-12 Thread Francisco García
I solved the problem: from gluon.globals import json @request.restful() def getOrder(): response.view = 'generic.json' def GET(*args,**vars): patterns = [ "/p/:idOrder" ] # . res = {} res.update({'response': {'success': True, 'Key'

[web2py] Re: Extracting values out of a python list as individual entities

2017-05-12 Thread mostwanted
This is what i need Tony, I want to be able to count elements from the database and use what i get from the database in my array without having to explicitly hard code the number. If i have 5 elements i want to be able show those 5 elements and if they are 8 i want to be able to use the 8 eleme

Re: [web2py] Web2py Postgresql Groupby issue

2017-05-12 Thread Carlos Correia
On 11-05-2017 15:22, Oasis Agano wrote: > Hello > > i have moved my connection to Postgres from sqlite and im facing this issue; > >ret = self.get_cursor().execute(command, *a[1:], **b) > ProgrammingError: column "water_flow_log.id" must appear in the GROUP BY > clause or be used in an aggre

[web2py] Re: Extracting values out of a python list as individual entities

2017-05-12 Thread Anthony
That's what the Stack Overflow solution is supposed to do, but you have not been clear about the nature of your data and what you need the Javascript to end up looking like. What does the table definition look like, and what is stored in each record? In the code you have shown, you have the vari

[web2py] Re: How to get the value of a submitted form in the controller action [URGENT]

2017-05-12 Thread Anthony
Your code intercepts the form submission but doesn't actually submit the form data. You'll either have to extract the value from the form and add it to the Ajax URL query string (using Javascript, not Python), or use Javascript to serialize and submit the form via Ajax. You could make things a

[web2py] Re: recurring events from one form

2017-05-12 Thread Andrea Fae'
Hey guys...I know there are gurus of web2py...no suggestion? Please help me... thank you Il giorno giovedì 11 maggio 2017 21:40:42 UTC+2, Andrea Fae' ha scritto: > > Hello, I have a form that in this moment create one record in the > database. This records represent an event: > > db.define_tabl

[web2py] Re: Need help with student attendance app

2017-05-12 Thread Toe Khaing Oo
It works on data parsing .. But I have some difficulties with this. There are many students to update record into table. How can I insert one student by one. Thanks for your help On Saturday, May 6, 2017 at 6:03:07 PM UTC-7, pbreit wrote: > > I think you're on the right track. It's a personal

[web2py] Re: Expected behaviour of IS_IN_SET(set) if set is empty ?

2017-05-12 Thread Anthony
It seems like you are aiming for an odd user experience -- in some cases you provide a select widget that has no options, and when the user submits the form, it returns an error saying the field cannot be empty -- yet there is no way to provide a value. What is the user supposed to do in that ca

[web2py] Re: recurring events from one form

2017-05-12 Thread Dave S
On Friday, May 12, 2017 at 11:54:08 AM UTC-7, Andrea Fae' wrote: > > Hey guys...I know there are gurus of web2py...no suggestion? Please help > me... > thank you > > > Il giorno giovedì 11 maggio 2017 21:40:42 UTC+2, Andrea Fae' ha scritto: >> >> Hello, I have a form that in this moment creat

[web2py] Re: Need help with student attendance app

2017-05-12 Thread Dave S
On Friday, May 12, 2017 at 11:59:43 AM UTC-7, Toe Khaing Oo wrote: > > It works on data parsing .. But I have some difficulties with this. There > are many students to update record into table. How can I insert one student > by one. > > Thanks for your help > It sounds like you want a table

[web2py] Re: Autocomplete How to search in midle of string

2017-05-12 Thread isi_jca
Hi!!! Reading in http://web2py.readthedocs.io/en/latest/_modules/gluon/sqlhtml.html I discovered this parameter "at_beginning" when it is setting in false it is possible to search in middle of the string. Example: db.tpersona.idprovincia.widget = SQLFORM.widgets.autocomplete(request, db.trpr

[web2py] Re: +Add Record in smartgrid

2017-05-12 Thread Ben Lawrence
I did the same but did not work. The button changed to 'Add Person' OK, but received an error when clicking button 'Add Person'. Is it because I am using a different version of web2py 2016.05.10 ? addButton=alertGrid.element(_title='Add record to database') addBu

[web2py] Re: +Add Record in smartgrid

2017-05-12 Thread Dave S
On Friday, May 12, 2017 at 1:56:35 PM UTC-7, Ben Lawrence wrote: > > I did the same but did not work. The button changed to 'Add Person' OK, > but received an error when clicking button 'Add Person'. Is it because I am > using a different version of web2py 2016.05.10 ? > > addB

[web2py] Re: +Add Record in smartgrid

2017-05-12 Thread Ben Lawrence
I assumed the element was found because the button 'Add Record' did change to 'Add Person' in the view... On Friday, May 12, 2017 at 1:59:47 PM UTC-7, Dave S wrote: > > > > On Friday, May 12, 2017 at 1:56:35 PM UTC-7, Ben Lawrence wrote: >> >> I did the same but did not work. The button changed t

[web2py] Re: WEB2PY iOS install APP

2017-05-12 Thread Donald McClymont
Is it still required to jailbreak iOS if you want to install Web2py on iOS? Was considering giving this a go with Pythonista but I have not really done much investigation. I am not particularly keen on jailbreak as I don't trust apple to not brick the device at some point if I do this. But i

[web2py] Re: +Add Record in smartgrid

2017-05-12 Thread Dave S
On Friday, May 12, 2017 at 2:13:31 PM UTC-7, Ben Lawrence wrote: > > I assumed the element was found because the button 'Add Record' did change > to 'Add Person' in the view... > The line where you assign "Add Person" to addButton[0] is where you get the exception. I believe that says addButt

[web2py] Re: How do I change the sqlform button location

2017-05-12 Thread Paolo Caruccio
For label within its related input, you could use placeholder HTML attribute. In order to accomplish this you could customize the field widget. For example, the widget for the password field of auth_user table could be db.auth_user.password.widget=lambda f, v: SQLFORM.widgets.password.widget(f

[web2py] Re: Use reserved Keyword 'response'

2017-05-12 Thread pbreit
You can return a strong: return res but if you return a dict, it would need to be: return dict(res=res) -- 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) ---