[web2py] how to make autocomplete widget show arbitrary values in the list

2012-09-22 Thread a22375
Hi all, How to solve this: There are two tables, table "xref" has two fields with a reference to table "table". Look at the format of "table". db.define_table('table', Field('name', type='string'), Field('number', type='integer'), auth.signature, format=

[web2py] Re: (2.0.9) compute fields don't work on db update

2012-09-22 Thread VP
I figured out what I would call a bug. I'll give an example: Let's say we have this table: product = db.define_table('product', Field('cost1'), Field('cost2'), Field('total', compute = lambda r: r['cost1'] + r['cost2'])) And if you do this: product.insert(cost1=10, cost2=20) p = db.product(

[web2py] routes_onerror

2012-09-22 Thread lyn2py
I have this code in the *app-specific* routes.py routes_onerror = [ ('*/*', '/myapp/static/error.html') ] I reload routes, but it still prints invalid function (nothing/here) I am using: Version 2.0.9 (2012-09-17 21:37:10) stable May I know what I am doing wrong? Thank you. --

[web2py] Re: smartgrid: linked_tables=dict(parent=['child'], child=[''])

2012-09-22 Thread Adi
If I may rephrase and clarify a question: Is it possible to add control, through dictionary in (smartgrid) linked_tables when will links display? e.g: linked_tables=dict(parent=['child'], child=['']) wishful outcome: display children links for parent table, but don't display any related links

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

2012-09-22 Thread Brian M
Try this it'll give you a form, intercept the form submission and instead do an ajax call to the validate page which checks the email and password and if that's correct will return True and the page will get forwarded via JS to the next page with your email & password in the URL as args. Why do

[web2py] Re: (2.0.9) compute fields don't work on db update

2012-09-22 Thread Massimo Di Pierro
Can you show us an example? computed fields usually do not work when there is not enough information to compute. The information must be in the arguments of update_record or update. It will not retrive the info from the database. On Saturday, 22 September 2012 15:43:59 UTC-5, VP wrote: > > -

[web2py] Re: 'efficiently search by tag' with postgres

2012-09-22 Thread Massimo Di Pierro
Looks like postgres is picky and wants in groupby all the selected fields in distinct. This should work: rows = db(data.id==tag.record_id)\ (tag.name.belongs(tags)).select( data.ALL, orderby=data.id, groupby=data.id|data.value, distinct=True) On Saturday, 22 Septe

[web2py] Re: New Plugin to add client side validation to your SQLFORM

2012-09-22 Thread Massimo Di Pierro
This is really a good idea. I will try it asap. Join us on web2py-developers. On Tuesday, 24 July 2012 09:38:51 UTC-5, Franco wrote: > > > > > Greetings everyone. I want to share with you this pl

[web2py] (2.0.9) compute fields don't work on db update

2012-09-22 Thread VP
- sqlite - 2 compute fields do not seem to get call on update using both update_record and db().update - They do work on crud/form updates though. --

[web2py] Re: 'efficiently search by tag' with postgres

2012-09-22 Thread andrej burja
the code with problem: rows = db(data.id==tag.record_id)\ (tag.name.belongs(tags)).select( data.ALL, orderby=data.id, groupby=data.id, distinct=True) On Saturday, September 22, 2012 10:26:27 AM UTC+2, andrej burja wrote: > > hi > > i would like to use idea in bo

[web2py] Re: Migrating from CGI Script

2012-09-22 Thread thinkwell
Apologies, apologies, Niphlod. Went to get the controller and saw might mistake. Classic PEBKAC situation. Thanks for your help. On Saturday, September 22, 2012 9:45:05 AM UTC-4, Niphlod wrote: > > Can you please post the complete controller ? I still don't understand > when you say "the view is

[web2py] Re: Problem updating list fields

2012-09-22 Thread Luca
Why not? I thought (as in functional programming) that the update statement was specifying an expression to be called on every resulting row, and so I wrote an expression that defines a new list given an old list -- just as you might define a new integer value on the basis of an old integer va

[web2py] Re: New Plugin to add client side validation to your SQLFORM

2012-09-22 Thread Samuel Marks
Any update on the clientvalidation=True extension to the SQLFORM class? On Wednesday, July 25, 2012 4:44:55 AM UTC+10, Massimo Di Pierro wrote: > > Can you tell us more about how it works? > > On Tuesday, 24 July 2012 09:38:51 UTC-5, Franco wrote: >> >> >>

[web2py] Re: PollyReport (framework for report generation)

2012-09-22 Thread Jose
El sábado, 22 de septiembre de 2012 12:27:23 UTC-3, Massimo Di Pierro escribió: > > This is really nice. I would like to see it compares with fpdf (which now > ships with web2py). > I also suggest you post this example on web2pyslices so it does not get > lost. It will be valuable to others. >

[web2py] Re: PollyReport (framework for report generation)

2012-09-22 Thread Jose
El sábado, 22 de septiembre de 2012 12:35:59 UTC-3, Massimo Di Pierro escribió: > > I am looking at the source code. Is this really one single file > (pollyreports.py)? I cannot find a single import in there and I cannot find > the word "pdf" in there either. Is that really the files that gene

Re: [web2py] Re: PollyReport (framework for report generation)

2012-09-22 Thread Bruno Rocha
On Sat, Sep 22, 2012 at 12:35 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I am looking at the source code. Is this really one single file > (pollyreports.py)? I cannot find a single import in there and I cannot find > the word "pdf" in there either. Is that really the files that g

[web2py] Re: response.files with no file suffix

2012-09-22 Thread howesc
i added http://code.google.com/p/web2py/issues/detail?id=1025. thanks! On Friday, September 21, 2012 7:47:35 PM UTC-7, Massimo Di Pierro wrote: > > There was a way to do this but apparently got broken. Please open a ticket > and I will put it back tomorrow. > > > On Friday, 21 September 2012 15:

Re: [web2py] Re: PollyReport (framework for report generation)

2012-09-22 Thread Ovidio Marinho
let's test Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83 9334 0266 - Claro Brasil 2012/9/2

[web2py] Re: PollyReport (framework for report generation)

2012-09-22 Thread Niphlod
seems to me a nice "impaginator" working off reportlab's pdfgen.canvas. On Saturday, September 22, 2012 5:35:59 PM UTC+2, Massimo Di Pierro wrote: > > I am looking at the source code. Is this really one single file > (pollyreports.py)? I cannot find a single import in there and I cannot find > t

[web2py] Re: PollyReport (framework for report generation)

2012-09-22 Thread Massimo Di Pierro
I am looking at the source code. Is this really one single file (pollyreports.py)? I cannot find a single import in there and I cannot find the word "pdf" in there either. Is that really the files that generates the PDF? On Saturday, 22 September 2012 07:21:41 UTC-5, Jose wrote: > > Hi > > This

[web2py] Re: PollyReport (framework for report generation)

2012-09-22 Thread Massimo Di Pierro
This is really nice. I would like to see it compares with fpdf (which now ships with web2py). I also suggest you post this example on web2pyslices so it does not get lost. It will be valuable to others. Here it will get lost. massimo On Saturday, 22 September 2012 07:21:41 UTC-5, Jose wrote: >

[web2py] Re: Forms removing data on errors...

2012-09-22 Thread Massimo Di Pierro
Check the Chrome JS console. It could be you have an extra redirect on error. On Saturday, 22 September 2012 05:09:22 UTC-5, encompass wrote: > > I am trying to fix a bug in InterestID. http://interestid.com > The issue is that the form looses the data you enter if there is an > error in the f

[web2py] Re: Bootstrap icons don't work with latest web2py?

2012-09-22 Thread Massimo Di Pierro
Just fixed in trunk. Sorry my fault. On Saturday, 22 September 2012 01:51:13 UTC-5, LightDot wrote: > > I took a closer look and it seems that this is caused by the css comments > in the latest web2py_bootstrap.css commit. The /* */ style is the only > valid comment style for css, // isn't. I re

[web2py] Re: wiki with 3 columns

2012-09-22 Thread Massimo Di Pierro
Yes. {{left_sidebar_enabled = right_sidebar_enabled = True}} {{extend 'layout.html'}} {{block left_sidebar}} {{=auth.wiki('right_sidebar')}} {{end}} {{=content}} {{block left_sidebar}} {{=auth.wiki('_cloud')}} {{=auth.wiki('left_sidebar')}} {{pass}} On

Re: [web2py] Superfish in Web2py 2.0

2012-09-22 Thread Patrick Ryan
Thanks Richard. That's very helpful. I'm looking to use the MENU helper to build a custom sidebar menu so all I need to do now is isolate and modify the js and css. Is nav now the default class id for the helper? On Saturday, September 22, 2012, Richard Vézina wrote: > It works with Bootstrap now

Re: [web2py] Unable to get the date widget to work

2012-09-22 Thread Richard Vézina
Hmm... It should work out of the box... Is your app customized? Why do you have to care about .js, web2py,js, they should be already in use... Are you migrating a old app under new web2py version? If so, you may have to change your layout in order to include those files you are talking about, sin

Re: [web2py] Superfish in Web2py 2.0

2012-09-22 Thread Richard Vézina
It works with Bootstrap now as far as I can see, there is a piece of js in the layout to allow bootstrap menu to have the same behavior of superfish (I mean submenu, subsubmenu, etc.). I try my app in the under new web2py 2.0.X version and I didn't have to make any change to my MENU() stuff. When

[web2py] Unable to get the date widget to work

2012-09-22 Thread Alec Taylor
I've tried to be as specific as possible with my date field, but I still can't get it to work. Field('DOB', 'date', requires=IS_DATE_IN_RANGE(minimum=date(1920,12,31),format ='%d-%m-%Y'), label=T('D.O.B.'), default=date(1920,12,31), widget=SQLFORM. widgets.date.widget) Note that I've tried includ

[web2py] Re: Migrating from CGI Script

2012-09-22 Thread Niphlod
Can you please post the complete controller ? I still don't understand when you say "the view is ok, but request.post_vars is empty". If you built a view in web2py, and it's tied to that controller, it's impossible that the view can "see" something that the controller "isn't seeing". On Satur

[web2py] Re: Migrating from CGI Script

2012-09-22 Thread thinkwell
Yes, the form was generated outsite web2py and posted to the web2py controller "submit_site". My frustration is that in the controller, response.post_vars.submit_ip (and all form fields) have a value of None, but in the VIEW, they show correctly. WHY!? It can't be blamed out the external form

[web2py] Re: Any updates on this problem (boolean for MySQL from CHAR to TINYINT)?

2012-09-22 Thread MichaelF
Converting to 2.x fixes the problem. On Thursday, September 20, 2012 10:16:46 AM UTC-6, MichaelF wrote: > > Sorry for being impatient...any updates on this problem ( > https://groups.google.com/d/topic/web2py/IukqqZF_PPE/discussion) > > The problem is changing the web2py type of 'boolean' on MySQL

[web2py] Re: "boolean" type in MySQL: CHAR(1) vs TINYINT(1)

2012-09-22 Thread MichaelF
Converting to 2.x fixed the problems. On Wednesday, September 19, 2012 12:04:28 PM UTC-6, MichaelF wrote: > > I have come across one bug with this. If I add a record using the admin > interface, I check the 'Is_home_team' checkbox (Is_home_team is defined as > a boolean, of course), yet the reco

[web2py] Re: Radio widget doesn't work with IS_IN_SET validator?

2012-09-22 Thread Don_X
Hello Alec, Use the following radio widget : http://dev.s-cubism.com/plugin_hradio_widget and I believe your problem will be fixed ! --

[web2py] PollyReport (framework for report generation)

2012-09-22 Thread Jose
Hi This is PollyReport [1] y [2]. You can use downloading PollyReport.py and copying the file to the directory site-packages web2py or installed directly on the system. This is a small example based on the author's tutorial: Model tb_tiposclientes = db.define_table('tiposclientes', Field(

[web2py] Re: Migrating from CGI Script

2012-09-22 Thread Niphlod
I didn't get the problem. Wasn't the form generated "outside" web2py and you wanted web2py only to catch the submitted part ? request.post_vars include every value (hidden or not) that the controller receives. if in response.post_vars there's no "submit_ip", than it's probably your "outside" fo

[web2py] Forms removing data on errors...

2012-09-22 Thread Jason Brower
I am trying to fix a bug in InterestID. http://interestid.com The issue is that the form looses the data you enter if there is an error in the form. Any ideas why? In particular the invitation and event texts are not staying if there is some kind of error. You can try it on out testing server

[web2py] Re: Radio widget doesn't work with IS_IN_SET validator?

2012-09-22 Thread Alec Taylor
Whoops, figured out the problem. Slight problem left though, the radio text are misaligned to the buttons, how do I fix this? Screenshot: http://i.imgur.com/Uykb7.png On Sat, Sep 22, 2012 at 6:43 PM, Alec Taylor wrote: > I've got a simple field in my registration form: > > Field('field_of_studi

[web2py] Radio widget doesn't work with IS_IN_SET validator?

2012-09-22 Thread Alec Taylor
I've got a simple field in my registration form: Field('field_of_studies', requires=IS_IN_SET(['sciences', 'social-sciences', 'arts', 'business']), widget=SQLFORM.widgets.radio.widget), However when rendered on the page it only shows up as 4 radio buttons; with nothing next to them. (no text) Ho

[web2py] 'efficiently search by tag' with postgres

2012-09-22 Thread andrej burja
hi i would like to use idea in book Application Development Cookbook - Efficienty search by tag. there are two functions: 'search_or' and 'search_and' everything is working fine on sqlite when i switch to postgres, there seems to be problem with 'groupby'. i got an error column "data.value"