[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: -

[web2py] Unexpected behavior using GRID form with selectable option.

2014-04-23 Thread alex
Hello guys, I'm experiencing an unexpected behavior using grid form with selectable option, need help. I have a temporal table 'rogue_rows' in a database 'dyn_db'. This table includes rows from different tables of another database. Please refer to the controller index() code: def index():

[web2py] Change button to loading after clicked

2014-04-23 Thread LoveWeb2py
Hello, I'm using the form=FORM('Search text:', INPUT(_name='texttofind', INPUT(_type='submit')) which generates a button and a search field on a web page when I type {{=form}} How can I change the button to loading when a user clicks it I found this documentation on jquery

[web2py] How can I open a temporary PDF in a new tab

2014-04-23 Thread csavorgn
Hi everyone, I'm using a SQLFORM.factory to get the data I need to generate a PDF file using ReportLab. I'm using a submit button to check for the data entered and to open a new page using redirect: redirect(URL(default,result, vars=dict(start=form.vars.date_start,

[web2py] Re: How can I open a temporary PDF in a new tab

2014-04-23 Thread Oli
URL('Link for a new tab', _class=btn , _title=T(in a new tab), _href=URL(default,yourcontroller,args=[*row.id* http://row.id/]), *_target='_blank'*) Am Mittwoch, 23. April 2014 15:55:50 UTC+2 schrieb csavorgn: Hi everyone, I'm using a SQLFORM.factory to get the data I need to generate a

[web2py] Re: Issue 1865 code sample as requested

2014-04-23 Thread Remco Boerma
Massimo, Thanks for responding in the comment. I've responded to yours but don't know if you'd prefer bringing that over to the mailing list or not. What's the rule of thumb for that - when to file a bug and keep on posting there and when to write to the mailinglist? Regards, Remco Op

[web2py] Please help with Absolute URL

2014-04-23 Thread JoeCodeswell
Dear web2py users group, I am trying to generate an absolute URL using the URL helper to connect with WordPress.com. Here's the code: wpcc_consts = { client_id: '12345', #Joe's redirect_uri: URL(f='connected', scheme='http', host= 'joecodeswell.com', url_encode=False), # see

[web2py] Re: Please help with Absolute URL

2014-04-23 Thread Anthony
Is this a web2py URL, or are you just trying to use the URL() function to generate an external URL (not its intended purpose)? Anyway, you cannot leave out the function -- in that case, it assumes the app is the controller, the controller is the function, and the current app is the true app.

[web2py] Re: Please help with Absolute URL

2014-04-23 Thread JoeCodeswell
Dear Anthony, Thanks for the response. Is this a web2py URL, or are you just trying to use the URL() function to generate an external URL (not its intended purpose)? I am trying to use the URL() function to generate an external URL. I didn't know that was not its intended purpose. you

[web2py] Re: Best way to migrate from sqlite to postgresql (or other db)

2014-04-23 Thread Michael Beller
Over the past week I've experimented with several options (I'm moving from sqlite to mysql on python anywhere) and here's what worked for me (and hope this helps others) ... The book describes two methods: - export/import all data using CSV files (

[web2py] Re: Bug in deflate of json fields

2014-04-23 Thread Sebastian Ortiz Vasquez
On Monday, April 21, 2014 3:38:08 PM UTC-5, Sebastian Ortiz Vasquez wrote: Hi, i discovered a bug, but don't have enoght time to solve this. The problem is this, i'm using psycopg2==2.5.2 to get this working, because pg8000 still in web2py distribution does not work. I defined a field of

[web2py] Re: Please help with Absolute URL

2014-04-23 Thread Anthony
You have to specify a non-falsey value for f. Sorry, but I don't think you can do what you want to do with the URL() function. Since it's an external URL, just write the URL by hand. To build the query string, just do: import urllib query = urllib.urlencode(params) And if you don't want the

[web2py] Re: How can I open a temporary PDF in a new tab

2014-04-23 Thread csavorgn
I tried to use your code (with the obvious modifications) but I can't really figure out how to use it... Could you better explain your solution? Thanks Carlo On Wednesday, April 23, 2014 4:00:26 PM UTC+2, Oli wrote: URL('Link for a new tab', _class=btn , _title=T(in a new tab),

[web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard
Hello, Is there a way to tell SQLFORM.grid to only allow simple search? I mean, not have the query constructor to appear, just the search box where we can search in all the fields? Thanks Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] AttributeError: 'Table' object has no attribute 'db' in appadmin deleting db.auth_user entry

2014-04-23 Thread DenesL
Hi all, web2py™ Version 2.9.5-stable+timestamp.2014.03.16.02.35.39 Python Python 2.7.5+: /usr/local/bin/uwsgi (prefix: /usr) on pythonanywhere.com Trying to delete an entry from db.auth_user via appadmin I get Traceback (most recent call last): File

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard Vézina
This could be a new feature for .grid()... In gluon/sqlhtml.py near line 2261... This : INPUT(_name='keywords', _value=request.vars.keywords, _id=skeywords_id, _onfocus=jQuery('#%s').change();jQuery('#%s').slideDown(); % (spanel_id, sfields_id)), Could become this :

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Anthony
Maybe call it advanced_search. On Wednesday, April 23, 2014 1:52:59 PM UTC-4, Richard wrote: This could be a new feature for .grid()... In gluon/sqlhtml.py near line 2261... This : INPUT(_name='keywords', _value=request.vars.keywords, _id=skeywords_id,

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard Vézina
Yop, you are right! I will send a PR on github and see what happen... Richard On Wed, Apr 23, 2014 at 2:19 PM, Anthony abasta...@gmail.com wrote: Maybe call it advanced_search. On Wednesday, April 23, 2014 1:52:59 PM UTC-4, Richard wrote: This could be a new feature for .grid()... In

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard Vézina
https://github.com/web2py/web2py/pull/428 On Wed, Apr 23, 2014 at 2:24 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Yop, you are right! I will send a PR on github and see what happen... Richard On Wed, Apr 23, 2014 at 2:19 PM, Anthony abasta...@gmail.com wrote: Maybe call it

[web2py] Re: Please help with Absolute URL

2014-04-23 Thread JoeCodeswell
On Wednesday, April 23, 2014 9:31:51 AM UTC-7, Anthony wrote: You have to specify a non-falsey value for f. Sorry, but I don't think you can do what you want to do with the URL() function. Since it's an external URL, just write the URL by hand. To build the query string, just do: import

[web2py] Re: Please help with Absolute URL

2014-04-23 Thread JoeCodeswell
Thanks, Anthony. Sounds like a plan. Love and peace, Joe On Wednesday, April 23, 2014 9:31:51 AM UTC-7, Anthony wrote: You have to specify a non-falsey value for f. Sorry, but I don't think you can do what you want to do with the URL() function. Since it's an external URL, just write the

[web2py] list:reference field number of entries

2014-04-23 Thread BlueShadow
Hi, I got a list:reference field where there are very many entries to choose from and the default field shows only 5 entries is there a way to increase that number or get a better field to select multiple entries? thanks for your help -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] list:reference field number of entries

2014-04-23 Thread Richard Vézina
Use a jquery multiselect plugin... Or set a size to the select : select size=10 multiple With _size='10' maybe... Richard On Wed, Apr 23, 2014 at 3:18 PM, BlueShadow kevin.bet...@gmail.com wrote: Hi, I got a list:reference field where there are very many entries to choose from and the

Re: [web2py] list:reference field number of entries

2014-04-23 Thread Niphlod
this should work db.table.field.widget = lambda field,value: SQLFORM.widgets.multiple.widget(field,value,size=10) -- 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: Unexpected behavior using GRID form with selectable option.

2014-04-23 Thread Niphlod
first of all: a simpler example reproducing the erroneous behaviour may pinpoint better the cause. To help debugging, I'd avoid truncating and reinserting records every time you land on index() Then, I have a question: what does it mean only top rows from one table are updated ? On Wednesday,

[web2py] Re: scheduler

2014-04-23 Thread Niphlod
you're doing all wrong. Stop copy/pasting for a sec and take a look to docs.it'll save you from multiple headaches. in this case, you're doing wrong form processing. It's either form = SQLFORM(...) if form.accepts(request.vars, session): things to do when form is valid elif

[web2py] define my own HTML helper function?

2014-04-23 Thread Sharon Correll
Is there any way to define your own helper-like function that will generate a bit of parameterized HTML? What I'd like to do is: table tr {{=TD_custom(data[field1])}} {{=TD_custom(data[field2])}} {{=TD_custom(data[field3])}} {{=TD_custom(data[field4])}}

[web2py] Re: define my own HTML helper function?

2014-04-23 Thread Niphlod
either you put that function in models (works out of the box throughout all the app), or you write the function in every view it's needed. For the latter, please read http://web2py.com/books/default/chapter/29/05/the-views#Functions-in-views On Wednesday, April 23, 2014 10:19:55 PM UTC+2,

[web2py] Re: define my own HTML helper function?

2014-04-23 Thread Sharon Correll
Great, thanks! -- 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 subscribed to the Google Groups web2py-users

Re: [web2py] list:reference field number of entries

2014-04-23 Thread BlueShadow
Thanks Niphlod yours works. Richard can you tell me how one can implement the jquery multiple select plugin. I tried a fancy one some time ago which had two windows one showing the selected and one showing the unselected. but I could never get it to work. -- Resources: - http://web2py.com -

[web2py] Re: How can I open a temporary PDF in a new tab

2014-04-23 Thread csavorgn
Would there be a way to do what I explained if I give up using the SQLFORM.factory? How could I validate my form using e.g. JavaScript? On Wednesday, April 23, 2014 3:55:50 PM UTC+2, csavorgn wrote: Hi everyone, I'm using a SQLFORM.factory to get the data I need to generate a PDF file using

Re: [web2py] Re: REF: Bare Ajax Login

2014-04-23 Thread select
Was fighting with the problem in 2011 and still do, how to log in with ajax? The problem is that I have a one pager app with client site js code that needs to register if the user is logged in when I login with e.g. index.html: div id=i-login-form/div js code:

Re: [web2py] Re: REF: Bare Ajax Login

2014-04-23 Thread select
I just wanted to mention that a similar problem exist for request_reset_password, the call works, passoword is restet the email is send but there is just a blank return and I have no idea how to react on that on the client side without rewriting the web2py_ajax... routines On Thursday, April

[web2py] How to hide buttons from form

2014-04-23 Thread Fabiano Almeida
Hi, How to hide buttons from form? designrequestresponsesessiondb tablesdb stats Thanks, Fabiano -- 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

Re: [web2py] Re: scheduler

2014-04-23 Thread Frank
Hi Niphold, many thanks for your reply and valuable tips. On 23 Apr 2014 at 20:59:52, Niphlod (niph...@gmail.com) wrote: you're doing all wrong. Stop copy/pasting for a sec and take a look to docs.it'll save you from multiple headaches. Despite my error, isn’t it normal doing some copy-past

[web2py] Insert given in the table auth_group

2014-04-23 Thread Flavio Santos
Olá friends. I am starting to give my first steps with web2py. Pra to start: in the local bank using sqlite the problem below does not occur. (in localhost functions everything) My problem: when initiating the bank would like already inserting some groups predefined in the table auth_group

[web2py] Re: i am trying send email using web2py with gmail and using smtp setting i have attached all code

2014-04-23 Thread Jessica Le
I've been getting the following error: ***WARNING:web2py:Mail.send failure:[Errno 11004] getaddrinfo failed*** for the following code: mail = Mail() mail.settings.server = 'smtp.gmail.com:587' mail.settings.sender = 'em...@gmail.com' mail.settings.login =

[web2py] Form Master detail

2014-04-23 Thread Fabiano Almeida
Hi, I'm trying to do a master detail form. It is possible that the details form is grid style? How? Thanks, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Issue 1865 code sample as requested

2014-04-23 Thread Massimo Di Pierro
We can have a discussion here is you like. I think the most appropriate place is web2py developers. cache.disk currently locks the entire disk cache, not a single key. Massimo On Wednesday, 23 April 2014 09:35:24 UTC-5, Remco Boerma wrote: Massimo, Thanks for responding in the comment.

[web2py] Re: How to hide buttons from form

2014-04-23 Thread Massimo Di Pierro
You only have the buttons because you did not create a view for the action. On Wednesday, 23 April 2014 14:22:20 UTC-5, Fabiano Almeida wrote: Hi, How to hide buttons from form? designrequestresponsesessiondb tablesdb stats Thanks, Fabiano -- Resources: - http://web2py.com -

Re: [web2py] Re: REF: Bare Ajax Login

2014-04-23 Thread Teddy Nyambe
Web2py has excellent backend processing. I think the way Massimo made web2py to work supports less pure Ajax calls. I would recommend and request that core functions are made to support pure Ajax say a one page website, cause users now want to experience web apps as if they are desktop apps. On