[web2py] Re: postgres schemas rname issue

2014-10-15 Thread libertil
My bad!! I just realized I had a stupid typo in my model. It works fine now. Sorry > > -- 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 t

[web2py] postgres schemas rname issue

2014-10-15 Thread libertil
Hi, I am dealing with postgreSQL database with a fair number of tables and I currently group logically similar tables under different schemas.Now when I create the model I following the examples I was able to specify the schema using the rname. However I have issues when linking records from ta

[web2py] Re: Default time for datetime picker widget

2014-09-24 Thread libertil
Thank you for the answer, I am not sure your suggestion would work in my case. I have a datetime field that potentially can be NULL. In the form the datetime field is represented by default by the datetime picker widget, what I am looking for is a way to let the user select a date and have the t

[web2py] Re: ordering in dropdown

2014-09-23 Thread libertil
Manuele, Leonel thank you for the answer! It works as a charm now... @Leonel Strings ids come from specifications that are beyond my control : (. However I have to admin that they were useful in some cases. I did not put the unique in the model even though the contraint is implemented db side b

[web2py] ordering in dropdown

2014-09-23 Thread libertil
Hi, I am trying to implement a data entry form for an entity called Model. It should have a drop down menu showing entries from linked table pollutans. So far no problem in implementing it. I want now to reorder the elements in the dropdown menu using the field pollutant_order' in the pollutants_i

[web2py] Default time for datetime picker widget

2014-09-23 Thread libertil
Hi, I was wondering if there is an easy way to specify a default time (say 00:00) in place of the current system time in the datetime picker widget included in the web2py distribution Regards Luca -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

[web2py] ST_X function on POSTGIS geography() fields

2014-04-23 Thread libertil
Hi everyone, I am trying to extract latitude and longitude from a POSTGIS geography() field. Unfortunately the usual st_x() and st_y() functions normally used for geometry() fields won't work. How can I extract the required values or transform geography in geometry? Thanks -- Resources: - http:

[web2py] SQLFORM.factory pre populating from tables

2014-04-22 Thread libertil
Hi everyone, I am trying to make a form that mainly gets its data from a single table, there are however some fields that cannot be handled by SQLFORM. For instance I have in my table a PostGIS geography field holding the position of a point that I would like to update using text fields f

[web2py] tooltip button in SQLFORM.grid

2013-10-27 Thread libertil
I am trying to figure out a way customize a button in a SQLFORM.grid so that a tooltip text is shown. Is there a simple way to do that in web2py? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

[web2py] Not Authorized when adding a second form to a page

2013-10-18 Thread libertil
Hi, I am new to web2py and I am stuck with a strange problem. I am writing a simple application to manage a db. Within my application I am have two pages. - A main page with a SQLFORM.grid showing the records of Table A - A detail page showing the information and allowing edits of a single record

[web2py] Re: Column ordering in SAQLFORM.grid

2013-10-15 Thread libertil
Thank you Stefaan, it worked like a charm. Luca On Friday, October 11, 2013 8:55:37 PM UTC+2, stefaan wrote: > > Hi, > > > def index(): > > form = SQLFORM.grid(db.stazione, > > > fields={db.stazione.codice,db.stazione.sito_id,db.stazione.data_prelievo}, > >... > > You could try: > > fi

[web2py] Column ordering in SAQLFORM.grid

2013-10-10 Thread libertil
Hi, I am quite new to web2py so this might be a silly question I searched manual, forum and the web but I wasn't able to find solution. I am making a simple SQLFORM.grid based on an model. What happens is that I cannot control the column order. It seems that the columns in the grid appear in di