[web2py] Re: ubuntu 11.10 LTS not connecting to postgres

2012-05-20 Thread weheh
Excellent, Massimo. That did the trick. Thanks for the quick response.

[web2py] Contract work to build a bridge between a C# system and a broker API, using Web2py

2012-05-20 Thread vlc
I'd like to have a simple connector/bridge built between NinjaTrader 7 (NT7) and CityIndex API (CIAPI). Normal practice would probably be to build it in C# but I'd prefer it in Python, using web2py if possible. There is an incomplete Python version of the CIAPI library at http://code.google.com

[web2py] response.menu issue

2012-05-20 Thread Frank
hi,all, hope get help from you, {{=('|'.join(A(_[0],_href=_[2]).xml() for _ in response.menu))}} suppose to be several links on webpage, but it appear to be string on my app, how to change it? thanks, Frank

[web2py] Re: ubuntu 11.10 LTS not connecting to postgres [CLOSED]

2012-05-20 Thread weheh

Re: [web2py] Add count in db.parse_as_rest output

2012-05-20 Thread Joseph Piron
Massimo, here is the patch. Thanks ! On 19 May 2012, at 21:42, Massimo Di Pierro wrote: > yes please. Following this mailing list is getting more and more difficult > and number of posts increases. > > On Friday, 18 May 2012 17:26:22 UTC-5, howesc wrote: > you could submit a patchit's

[web2py] Re: web2py resources

2012-05-20 Thread puercoespin
El jueves, 3 de mayo de 2012 16:39:06 UTC+2, Massimo Di Pierro escribió: > > Please append here. Blogs about web2py: http://web2py.wordpress.com/ http://reingart.blogspot.com http://thadeusb.com/weblog/category/Web2py http://ochiba77.blogspot.com.es/ http://spametki.blogspot.com.es/

[web2py] Format representation in foreign table.

2012-05-20 Thread rahulserver
I have two tables: db.define_table('Account_Master',Field('Account',requires=IS_NOT_EMPTY()),Field('Sewadari1'),Field('Mb1'),Field('Sewadari2'),Field('Mb2'),Field('City'),Field('District'),Field('State'),Field('Email'),Field('Remark'),format='%(Account)s %(State)s ') db.define_table('Transaction

[web2py] Re: nginx uwsgi error 502 bad gate way

2012-05-20 Thread Deidre
Can I just say thank you to Gour for his suggestion of setting up a virtual machine and then the same linux as on my VPS. This approach had not occurred to me, but is such a good solution to allowing me to experiment. Peter On Thursday, May 17, 2012 12:06:12 AM UTC+1, Lewis wrote: > > Guys, I

[web2py] Re: response.menu issue

2012-05-20 Thread Anthony
By calling the .xml() method, you are serializing the A() helper before it gets written to the response body, so the template engine will escape the string instead of inserting it as HTML. To avoid that, wrap the whole thing in XML(): {{=XML('|'.join(A(_[0],_href=_[2]).xml() for _ in response.m

[web2py] Passing a SELECT

2012-05-20 Thread Madu
Hello, I'm trying to pass a SELECT as follows: def showToolEntries(): if request.args(0) in ToolsDB.tables: return dict(entries=SELECT("Select from list", operationalToolsDB(). select(ToolsDB[request.args(0)].serial_number))) I have a DB called ToolsDB and I have several tables in th

[web2py] Re: Format representation in foreign table.

2012-05-20 Thread Anthony
> > db.define_table('Account_Master',Field('Account',requires=IS_NOT_EMPTY()),Field('Sewadari1'),Field('Mb1'),Field('Sewadari2'),Field('Mb2'),Field('City'),Field('District'),Field('State'),Field('Email'),Field('Remark'),format='%(Account)s > > %(State)s ') > > db.define_table('Transaction_Master

[web2py] Re: response.menu issue

2012-05-20 Thread Frank
Anthony, thanks, Frank On Sunday, May 20, 2012 8:54:49 PM UTC+8, Anthony wrote: > > By calling the .xml() method, you are serializing the A() helper before it > gets written to the response body, so the template engine will escape the > string instead of inserting it as HTML. To avoid that, wr

[web2py] Re: Passing a SELECT

2012-05-20 Thread Anthony
> > I'm trying to pass a SELECT as follows: > def showToolEntries(): > if request.args(0) in ToolsDB.tables: > return dict(entries=SELECT("Select from list", operationalToolsDB > ().select(ToolsDB[request.args(0)].serial_number))) > SELECT() takes either a list or a set of positional

[web2py] Re: nginx uwsgi error 502 bad gate way

2012-05-20 Thread Gour
On Sun, 20 May 2012 05:38:35 -0700 (PDT) Deidre wrote: > Can I just say thank you to Gour for his suggestion of setting up a > virtual machine and then the same linux as on my VPS. I'm glad it was helpful to you. :-) > This approach had not occurred to me, but is such a good solution to > allo

[web2py] Re: What to expect in web2py 2.0

2012-05-20 Thread nick name
On Saturday, May 19, 2012 4:10:13 PM UTC-4, Massimo Di Pierro wrote: > > Basically the same features we have in trunk now. Just lots of bug fixes > compared to latest table. > We will also have full versining, geo api in db, possibly better support > for mongodb and sybase, and a new welcome app

[web2py] file upload field dissapears if form is not valid

2012-05-20 Thread Sebastian E. Ovide
Hi All, if a form has some file upload fields, and some field validation then when the form is submitted with some field not valid (such as mandatory field not filled up), then the form will display the usual red message (as it should), keeping all the values of the form as entered by the user exc

[web2py] HTSQL & web2py

2012-05-20 Thread Gour
Hello, some time ago we were considering to use HTSQL (http://htsql.org/) in our project to make it easier for end-users to perform complex queries on their database easily, but the barrier was HTSQL's licensing. Now we see that they did change a license and noticed: "...We provide meta-data adap

[web2py] Re: Passing a SELECT

2012-05-20 Thread Madu
Thank you very much Anthony for your detailed explanation. I didn't realize the db select returns a Rows object. Your solution worked! Thank you. On Sunday, May 20, 2012 11:03:33 PM UTC+9, Anthony wrote: > > I'm trying to pass a SELECT as follows: >> def showToolEntries(): >> if request.ar

[web2py] good read about python

2012-05-20 Thread Massimo Di Pierro
http://satyajit.ranjeev.in/2012/05/17/python-a-few-things-to-remember.html

[web2py] Re: Contract work to build a bridge between a C# system and a broker API, using Web2py

2012-05-20 Thread Massimo Di Pierro
very interesting. On Sunday, 20 May 2012 02:39:52 UTC-5, vlc wrote: > > I'd like to have a simple connector/bridge built between NinjaTrader 7 > (NT7) and CityIndex API (CIAPI). Normal practice would probably be to > build it in C# but I'd prefer it in Python, using web2py if possible. > There

[web2py] Re: What to expect in web2py 2.0

2012-05-20 Thread Massimo Di Pierro
I am waiting to see if Tim wants to work on this (he is the rocket man) as I'd rather not fork it. Massimo On Sunday, 20 May 2012 09:15:19 UTC-5, nick name wrote: > > On Saturday, May 19, 2012 4:10:13 PM UTC-4, Massimo Di Pierro wrote: >> >> Basically the same features we have in trunk now. Just

[web2py] Re: file upload field dissapears if form is not valid

2012-05-20 Thread Anthony
On Sunday, May 20, 2012 10:22:02 AM UTC-4, sebastian wrote: > > Hi All, > > if a form has some file upload fields, and some field validation then when > the form is submitted with some field not valid (such as mandatory field > not filled up), then the form will display the usual red message (as

[web2py] Re: file upload field dissapears if form is not valid

2012-05-20 Thread Massimo Di Pierro
Yes. We could change this and cache the file. Open a ticket as suggestion for improvement. Anyway, this needs to be thought true has it may have some security implications. On Sunday, 20 May 2012 09:22:02 UTC-5, sebastian wrote: > > Hi All, > > if a form has some file upload fields, and some fie

[web2py] Re: HTSQL & web2py

2012-05-20 Thread Massimo Di Pierro
It would be a good idea. I am not sure how easy or difficult it would be. I will take a closer look. On Sunday, 20 May 2012 09:35:37 UTC-5, Gour wrote: > > Hello, > > some time ago we were considering to use HTSQL (http://htsql.org/) in > our project to make it easier for end-users to perform c

Re: [web2py] good read about python

2012-05-20 Thread Bruno Rocha
(func if x else otherfunc)(*args) This is a nice tip, I can remove a lot of if's using this. Thanks for sharing. http://zerp.ly/rochacbruno Em 20/05/2012 11:48, "Massimo Di Pierro" escreveu: > http://satyajit.ranjeev.in/2012/05/17/python-a-few-things-to-remember.html >

Re: [web2py] Re: SQLFORM.grid import

2012-05-20 Thread Jonathan Lundell
On May 19, 2012, at 1:06 PM, Massimo Di Pierro wrote: > I'd take a patch. There may be some issues I have not though of. I took a look at this, hoping it'd be a quick Sunday morning project. But I found myself in over my head, and not sure how to integrate an html upload control with the existin

[web2py] Editor broken in trunk?

2012-05-20 Thread Larry Weinberg
My previous web2py installation works fine I grabbed the trunk and out of the box the editor is unable to save. I can edit text, but there is no way to save the text now. Also, the menu bar is not visible for it. Is this a known problem or do I have some python installation problem?

[web2py] Re: Format representation in foreign table.

2012-05-20 Thread rahulserver
Thanks Anthony! I did as u said but now i get the following error: 'NoneType' object has no attribute 'Account' Here is the line which was found erroraneous(in pink): def viewreport(): form=SQLFORM.factory(Field('TID',requires=IS_IN_DB(db, db.Transaction_Master.id, lambda r: '%s %s %

[web2py] Computed Column specification based on child table attributes in web2py

2012-05-20 Thread rahulserver
I have 2 tables: db.define_table('Transaction_Master',Field('Account',db.Account_Master,requires=IS_IN_DB(db,'Account_Master.id', '%(Account)s %(State)s',zero=T('choose one'))),Field('Exam_Date','date'),Field('Entry_Date','date',default=request.now),Field('Form_1','upload'),Field('Form_1_Name'),

[web2py] Re: Is there anyone who running web2py application on Redhat openshift?

2012-05-20 Thread Changju
Hi JungHyun. I have one question for you. I don't know about Openshift but I want to know why you chose Openshift other than Pythonanywhere or Fluxflex which are all free for low traffic. Thanks, Changju On Saturday, May 19, 2012 7:44:31 PM UTC+9, JungHyun Kim wrote: > > Andrew!! > > It works !!

[web2py] Re: Editor broken in trunk?

2012-05-20 Thread Massimo Di Pierro
known problem. can you save by clicking the button? On Sunday, 20 May 2012 10:46:42 UTC-5, Larry Weinberg wrote: > > My previous web2py installation works fine > > I grabbed the trunk and out of the box the editor is unable to save. I > can edit text, but there is no way to save the text now. A

[web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Ashraf Mansour
I think this is an important topic, And needs to be highlighted in the book and by example. On Saturday, December 3, 2011 7:10:59 PM UTC+3, Vineet wrote: > > I referred to the below-mentioned thread (but could not reply to it). > > > https://groups.google.com/group/web2py/browse_thread/thread/61d

Re: [web2py] Re: Editor broken in trunk?

2012-05-20 Thread Mariano Reingart
You can use the previous editor by changing the 10th line in web2py/applications/admin/models/0.py to TEXT_EDITOR = 'edit_area' or 'amy' The keybinding problem seems an issue of ACE, I'll take a look ASAP In which OS / Browser has happen the problem? Best regards Mariano Reingart http://www.sis

[web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Ashraf Mansour
I tried this and it did not work.:) what is the right way of doing it? On Saturday, December 3, 2011 7:37:58 PM UTC+3, Anthony wrote: > >

[web2py] plugin_dieromail

2012-05-20 Thread Alan Etkin
A new web2py plugin that features an interface for DineroMail IPNv2 (payment notification and detailed transaction reports). plugin_dineromail DineroMail is a third party online money transfer and payments system currently for Argentina, Brasil, Chil

Re: [web2py] Re: file upload field dissapears if form is not valid

2012-05-20 Thread Sebastian E. Ovide
done http://code.google.com/p/web2py/issues/detail?id=811 On Sun, May 20, 2012 at 4:03 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Yes. We could change this and cache the file. Open a ticket as suggestion > for improvement. Anyway, this needs to be thought true has it may have so

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Bruce Wade
{{=URL('controller','action', args=[arg1, arg2])}} On May 20, 2012 10:18 AM, "Ashraf Mansour" wrote: > I tried this > > > > and it did not work.:) > > what is the right way of doing it? > > On Saturday, December 3, 2011 7:37:58 PM UTC+3, Anthony wrote: >> >>

[web2py] Re: Editor broken in trunk?

2012-05-20 Thread Larry Weinberg
I cannot save with the button. I tried Safari and Chrome. Both had the problem. On Sunday, May 20, 2012 8:46:42 AM UTC-7, Larry Weinberg wrote: > > My previous web2py installation works fine > > I grabbed the trunk and out of the box the editor is unable to save. I > can edit text, but there is

[web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Anthony
On Sunday, May 20, 2012 1:18:44 PM UTC-4, Ashraf Mansour wrote: > > I tried this > > > > and it did not work.:) > > what is the right way of doing it? > A() doesn't produce a URL -- it produces an anchor tag (i.e., ...), to which you are then appending "/param1/param2", which obviously doesn't w

[web2py] Re: Editor broken in trunk?

2012-05-20 Thread Massimo Di Pierro
I have the same problem. I use chrome. On Sunday, 20 May 2012 13:09:19 UTC-5, Larry Weinberg wrote: > > I cannot save with the button. > I tried Safari and Chrome. Both had the problem. > > On Sunday, May 20, 2012 8:46:42 AM UTC-7, Larry Weinberg wrote: >> >> My previous web2py installation works

[web2py] Re: Format representation in foreign table.

2012-05-20 Thread Anthony
On Sunday, May 20, 2012 11:49:41 AM UTC-4, rahulserver wrote: > > Thanks Anthony! > > I did as u said but now i get the following error: > 'NoneType' object has no attribute > 'Account' > > Here is the line which was found erroraneous(in pink): > > def viewreport(): > form=SQLFORM.factory(Fi

[web2py] Re: Little problem with scheduler_task - has no signature Fields

2012-05-20 Thread szimszon
There are users they can trigger scheduled tasks and I need to audit it. I'll try what you say. And report back. 2012. május 18., péntek 17:56:19 UTC+2 időpontban Niphlod a következőt írta: > > you can put them on like in every table, and then prevent the scheduler > migrating the table setting

[web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Ashraf Mansour
thanks for the immediate reply. param1 and param2 are determined on the client side. how can it be generated by javascript? On Sunday, May 20, 2012 10:05:10 PM UTC+3, Anthony wrote: > > On Sunday, May 20, 2012 1:18:44 PM UTC-4, Ashraf Mansour wrote: >> >> I tried this >> >> >> >> and it did no

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Ashraf Mansour
thanks for the immediate reply. param1 and param2 are determined on the client side. how can it be generated by javascript? > >>>

[web2py] Re: Little problem with scheduler_task - has no signature Fields

2012-05-20 Thread Massimo Di Pierro
Please open a ticket about this. We can add options to add fields to scheduler tables. On Friday, 18 May 2012 03:43:38 UTC-5, szimszon wrote: > > Hi! > > I wonder if somebody could help me. > > I have to audit scheduler_task > db.scheduler_task._enable_record_versioning() works but scheduler_tas

[web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Anthony
On Sunday, May 20, 2012 3:43:38 PM UTC-4, Ashraf Mansour wrote: > > thanks for the immediate reply. > > param1 and param2 are determined on the client side. > > how can it be generated by javascript? > > It depends. Here's one example: jQuery(function() { var param1 = 'hello' var param2 = '

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Bruce Wade
Why would you do the code like that?? [?] Updated: jQuery(function() { var param1 = 'hello' var param2 = 'world' jQuery('a#mylink').attr('href', '{{=URL("action", args=["' + param1 + '","' + param2 + '"])}}'); }); {{=A('...', _href='', _id='mylink')}} On Sun, May 20, 2012 at 4:36 PM, Ant

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Anthony
He said param1 and param2 are determined on the client side -- which means they cannot be set on the server side by web2py. Of course, I don't know what he's actually doing on the client side, so this exact code may or may not be relevant. Do you have an alternative suggestion? Anthony On Sund

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Bruce Wade
Well honestly if it was a dynamic link I wouldn't even use URL as good style of JS programming is putting the code in a .js if this is the case then the web2py parser cannot even access the URL to parse it. (At least I have never been successful with that process.) If they are getting the params a

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Ashraf Mansour
thank you for your interest. let me brief what i am doing. I am building an application accessing google maps api v3. I need the function that decide if a certain point is within certain bounds. my understanding is that i need to do that in the view ( by passing the point and the coordinates of

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Bruce Wade
You do realise that you are missing the closing >? Also what you are trying to do in this code will never work. becomes /param1/param2 Try this: On Sun, May 20, 2012 at 7:09 PM, Ashraf Mansour wrote: > thank you for your interest. > > let me brief what i am doing. I am building

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Anthony
I wasn't suggesting he should use the URL() function, just pointing out that it *can't* be used to build a URL on the client side, and showing a simple example of how to build a URL on the client side via Javascript (use of the URL() function was incidental and not central to the point of the e

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Ashraf Mansour
both and are not working ( they are not showing the values of param1 and param2 ) >

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Anthony
> > let me brief what i am doing. I am building an application accessing > google maps api v3. I need the function that decide if a certain point is > within certain bounds. my understanding is that i need to do that in the > view ( by passing the point and the coordinates of the bounds ). the

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Anthony
> > both > > > > and > > > > > are not working ( they are not showing the values of param1 and param2 ) > You are simply putting the literal strings "param1" and "param2" directly into your HTML there, so of course the values of those variables won't be shown. What are param1 and pa

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-20 Thread Bruce Wade
If param1 and param2 are from javascript: 1) You can not write the code in headers as you have current written you will have to use something like the following: // javascript function: function generateURL(param1, param2) { url = '/action/' + param1 + "/" + param2; $("url_with_params"

[web2py] ExecuteSQL, nested selects

2012-05-20 Thread Simon Ashley
trying the following expression but get an update according to the first record rather than being conditional on specific records processed: db.executesql("UPDATE Plant SET SiteID=(SELECT Site.id FROM Plant, Site WHERE Site.SiteId = Plant.SiteIdLink);") ie. all SiteID's get the value of the

[web2py] Routing stuff in apache instead of web2py

2012-05-20 Thread Jason Brower
A suppose it would be a little off topic, but I need it for my web2py application. The book tells me I shouldn't use routes in web2py and use apache. I have mod_proxy install, as I used the setup-web2py-ubuntu.sh script and it seems to have works perfects. I have the program installed and runnin

[web2py] Re: Web2py and exchange server

2012-05-20 Thread Gergely Orosz
Hi Khalil, I have tried telnet to the server and I was able to login fine Also sent an mail I am going to configure mutt on the server and will try it from it as well Regards Gergely On Friday, 18 May 2012 17:45:55 UTC+2, Niphlod wrote: > > It's probably not an issue of web2py. > > can yo

[web2py] Re: Web2py and exchange server

2012-05-20 Thread Gergely Orosz
Hi Niphlod, I was able to telnet to the exchange server from CentOS Also sent mail from SMTP over telnet I am going to configure mutt and will try send mails from it as well Regards Gergely On Friday, 18 May 2012 17:45:55 UTC+2, Niphlod wrote: > > It's probably not an issue of web2py. > >

[web2py] Re: Routing stuff in apache instead of web2py

2012-05-20 Thread pbreit
I believe if you set the default application in routes.py you will get waht you want. From: http://code.google.com/p/web2py/source/browse/router.example.py routers = dict( # base router BASE = dict( default_application = 'interestid', ), )

[web2py] How to prevent delete of a row with SQLFORM.grid -

2012-05-20 Thread François Delpierre
I must ensure there is always at least one row in a table. (My application parameter table) How can I prohibit delete of the last row of a table ? As it looks the ondelete is executed AFTER deletion... Thanks,

[web2py] Re: ExecuteSQL, nested selects

2012-05-20 Thread Simon Ashley
To answer my own post, syntax should have been: db.executesql("UPDATE Plant SET SiteID=(SELECT Site.id FROM Site WHERE Site.SiteId = Plant.SiteIdLink);") Sorry about that ... On Monday, May 21, 2012 2:50:33 PM UTC+10, Simon Ashley wrote: > > trying the following expression but get an upda

[web2py] Re: Little problem with scheduler_task - has no signature Fields

2012-05-20 Thread szimszon
Here it is: http://code.google.com/p/osmand/issues/detail?id=1012 Thank you! 2012. május 20., vasárnap 23:19:33 UTC+2 időpontban Massimo Di Pierro a következőt írta: > > Please open a ticket about this. We can add options to add fields to > scheduler tables. > > On Friday, 18 May 2012 03:43:38