Re: [web2py] Re: Dropdown field not being accepted

2011-07-01 Thread Bruno Rocha
Here is a modified version https://bitbucket.org/rochacbruno/surveycloud Bug fixes Auth included No more cpuckle Powertables Smart reports http://zerp.ly/rochacbruno Em 30/06/2011 23:59, pbreit pbreitenb...@gmail.com escreveu: Everything above the if form.accepts() is run each time the submit

Re: [web2py] SQL UNIQUE IN WEB2PY : CONSTRAINT unique_test UNIQUE (num_part1, num_part2, num_part3, title)

2011-07-01 Thread Bruno Rocha
Db.define_table('foo',Field('a'),Field('b'), Field('ab',unique=True, compute=lambda r: r.a + r.b)) http://zerp.ly/rochacbruno Em 30/06/2011 23:04, Nick Arnett nick.arn...@gmail.com escreveu: On Thu, Jun 30, 2011 at 6:43 PM, Nick Arnett nick.arn...@gmail.com wrote: On Thu, Jun 30, 2011 at

Re: [web2py] SQL UNIQUE IN WEB2PY : CONSTRAINT unique_test UNIQUE (num_part1, num_part2, num_part3, title)

2011-07-01 Thread Bruno Rocha
Validators, by the way, are enforced at the form level and have no direct effect on the db. There are 3 levels of validation. Db validadors: Unique, notnull, expression etc Dal validators: Required, compute, default etc Form dal validators: IS_IN_DB etc.. Note the former will be checked in

Re: [web2py] looks familiar, could be useful

2011-07-01 Thread Martín Mulone
It's sound familiar to me :O 2011/7/1 Massimo Di Pierro massimo.dipie...@gmail.com https://github.com/MisterRager/DOMination -- http://martin.tecnodoc.com.ar

[web2py] How to add user to user_auth table of CAS

2011-07-01 Thread sagar
Hi, I have situation where ,once I recive Email ids from users i have autogenerate password and mail to them. I can insert this info to my local user_auth table. I can add it in local user_auth table like below password=password

[web2py] Good syntax checker recommendations?

2011-07-01 Thread Cliff
Can anyone recommend a good syntax checker for Web2py? It would also be good to know how to prevent spurious error messages caused because the checker can't find all the import statements, etc.

[web2py] OffTopic Google+

2011-07-01 Thread Massimiliano
Anyone interested? Mail me privately Ciao -- Massimiliano

[web2py] Upload form using Load

2011-07-01 Thread David J.
I had this working a few weeks ago. I have an upload form which I load into the page using the LOAD helper. Right now I get an exception when I try to upload. Here is the code. def upload_contacts(): form = FORM(INPUT(_type='file', _name='data',requires=[IS_NOT_EMPTY()]),

[web2py] Re: Janrain login_next

2011-07-01 Thread Massimo Di Pierro
yes. 1) add a field 'completed_registration' to the auth_user table and default to False 2) then in a model if auth.user and not auth.user.completed_registration and not URL()==URL('default','user'): redirect('default','user/profile')) On Jul 1, 2011, at 8:32 AM, DanB wrote: fference

[web2py] Job - clone website

2011-07-01 Thread gubbanoa
Hi, I am interested in whether web2py can be used to clone a relatively simple ecommerce website made in Drupal. I have posted the job on elance, job number 24934137 and would welcome bids from this user group. I have specified Django or web2py, but would like to give web2py a go if I get a good

[web2py] Re: Janrain login_next

2011-07-01 Thread DanB
So, if I have this straight (sorry, very new to web2py, and python) to implement this in the Welcome App, I would add the following: To the db.py model (mostly uncommenting): from gluon.contrib.login_methods.rpx_account import RPXAccount auth.settings.actions_disabled = \

Re: [web2py] How to add user to user_auth table of CAS

2011-07-01 Thread sagar nigade
oops thinkig some other way soory...thats simple it can be encoded using urllib2 and send to cas app..there i can get in request.vars.i thinks thats the right approach.. On Fri, Jul 1, 2011 at 4:34 PM, sagar browse2sa...@gmail.com wrote: Hi, I have situation where ,once I recive Email ids

[web2py] Re: Upload form using Load

2011-07-01 Thread Anthony
Assuming you have ajax=True in LOAD(), I think file uploads will not work without some special setup. According to the book: **Please note:* Because Ajax post does not support multipart forms, i.e. file uploads, upload fields will not work with the LOAD component. You could be fooled into

Re: [web2py] Re: Upload form using Load

2011-07-01 Thread David J.
Got it thanks. Strange; I am almost certain that I had it working at some point; perhaps I am mistaken. Thanks for the heads up. On 7/1/11 10:03 AM, Anthony wrote: Assuming you have ajax=True in LOAD(), I think file uploads will not work without some special setup. According to the book:

[web2py] Forcing SSL/HTTPS

2011-07-01 Thread Ross Peoples
Since I want to make sure that my application is as secure as possible, I wanted to force all traffic to use HTTPS. At the bottom of my db.py, I have this: FORCED SSL # session.secure() if not request.is_https: redirect('https://%s/%s' % (request.env.http_host,

[web2py] Re: looks familiar, could be useful

2011-07-01 Thread Ross Peoples
a jQuery version of web2py's HTML helpersvery nice. I use jQuery heavily, but I rarely ever create DOM elements using JavaScript. Either I wrap hidden elements for later with display: none; or I just replace with HTML from an AJAX callback. But if creating DOM elements in JavaScript

Re: [web2py] Forcing SSL/HTTPS

2011-07-01 Thread Jonathan Lundell
On Jul 1, 2011, at 7:09 AM, Ross Peoples wrote: Since I want to make sure that my application is as secure as possible, I wanted to force all traffic to use HTTPS. At the bottom of my db.py, I have this: FORCED SSL # session.secure() if not request.is_https:

[web2py] Re: Job - clone website

2011-07-01 Thread Anthony
You might also contact some of the folks listed on http://www.experts4solutions.com/ -- they're all web2py developers. Anthony On Friday, July 1, 2011 7:08:46 AM UTC-4, gubbanoa wrote: Hi, I am interested in whether web2py can be used to clone a relatively simple ecommerce website made

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread LightOfMooN
Hello, just updated web2py to 1.97.1 and one of my sites crashed with the same problem: {{=LOAD('voting', 'voting_viewlet', ajax=False)[0][0]}} too bad On 1 июл, 01:10, pbreit pbreitenb...@gmail.com wrote: Any ideas on this one? Has anyone else had problems with LOAD(ajax=False) in trunk? I

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread LightOfMooN
def voting_viewlet(): return dict() works fine But if I try to check request.vars, it crashes: def voting_viewlet(): if request.vars.vote: pass return dict() rises an error On 1 июл, 20:46, LightOfMooN vladsale...@yandex.ru wrote: Hello, just updated web2py to 1.97.1 and

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread LightOfMooN
so, request has no vars storage On 1 июл, 20:53, LightOfMooN vladsale...@yandex.ru wrote: def voting_viewlet():     return dict() works fine But if I try to check request.vars, it crashes: def voting_viewlet():     if request.vars.vote:         pass     return dict() rises an error

Re: [web2py] Forcing SSL/HTTPS

2011-07-01 Thread Ross Peoples
I just tried the following by running web2py -S app -M -R my_script.py (since this is how I run the script from cron): from gluon.settings import global_settings print global_settings The cronjob value seems to always be False and I can't figure out how this actually gets set to True. Any

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread Anthony
That problem has been fixed in trunk, but looks like another problem may have been introduced. Try downloading trunk revision d4c2d8d15bb1 -- that fixes the request.vars problem, but comes before the copy.copy(request) problem was introduced. Actually, maybe you could try the latest revision in

Re: [web2py] Forcing SSL/HTTPS

2011-07-01 Thread Jonathan Lundell
On Jul 1, 2011, at 8:18 AM, Ross Peoples wrote: I just tried the following by running web2py -S app -M -R my_script.py (since this is how I run the script from cron): from gluon.settings import global_settings print global_settings The cronjob value seems to always be False and I can't

Re: [web2py] Forcing SSL/HTTPS

2011-07-01 Thread Ross Peoples
I'm calling from external cron, which is why this option is not getting set. So all I have to do is add --cronjob to my cron line and it's all set. Alternatively, while trying to figure this problem out, I noticed that global_settings.cmd_options.shell will return a string if run from the

Re: [web2py] Forcing SSL/HTTPS

2011-07-01 Thread Jonathan Lundell
On Jul 1, 2011, at 8:46 AM, Ross Peoples wrote: I'm calling from external cron, which is why this option is not getting set. So all I have to do is add --cronjob to my cron line and it's all set. Alternatively, while trying to figure this problem out, I noticed that

[web2py] SQLFORM.factory tablename doesn't affect submit row

2011-07-01 Thread Massimiliano
From something like that: form = SQLFORM.factory( Field('mydate', 'date', label='Data carico', requires=IS_DATE()), table_name='mytable', _id = 'myform' ) I got: [...] tr id=mytable_mydate__row style=display: table-row; .../tr tr id=submit_record__row/tr

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread LightOfMooN
Thx, but I just disabled some components until the new stable version of webpy :) On 1 июл, 21:29, Anthony abasta...@gmail.com wrote: That problem has been fixed in trunk, but looks like another problem may have been introduced. Try downloading trunk revision d4c2d8d15bb1 -- that fixes the

[web2py] Inline Table Editor.

2011-07-01 Thread David J.
Anyone know of a good jquery inline table editor? Thanks. I saw jqGrid; but I was looking for something less complex. I am really looking for something simple; Highlight a row; Edit a row; Save the data; I dont need sorting or anything like that.

[web2py] GAE discussion on Hacker News

2011-07-01 Thread Matt Gorecki
There is a discussion on Hacker News today about what Python frameworks are best suited for Google App Engine. http://news.ycombinator.com/item?id=2715887 Somebody with more technical knowledge than me should answer a few web2py questions over there. Specifically this one:

[web2py] web2py hosting

2011-07-01 Thread DenesL
Information collected from actual users of the service. Comments can belong to several people, and can be positive (+), negative (-) or other (~). This post will be updated periodically. Hosting company: Webfaction Type of service: latest web2py version: Python version: 2.4/3.2 OS version:

Re: [web2py] Navigation in Web2py having an active link

2011-07-01 Thread Andrew Evans
hey thanks worked like a dream *cheers On Wed, Jun 29, 2011 at 10:35 PM, Bruno Rocha rochacbr...@gmail.com wrote: I did this for web2py.com using request.function, I created a function tooggle_class which receives request.function and do this job. here is an example that I use in

[web2py] BUG: I think.

2011-07-01 Thread David J.
I am running latest in trunk. I have this code being called from a LOAD function; I see it appends the '.load' to the generated URL When I think it should be /campaigns/edit/5435 It returns /campaigns.load/edit/5435 table class=grid {{ for n in items:}} tr td{{= n.campaign_name }}/td

[web2py] web2py hosting

2011-07-01 Thread DenesL
Information collected from actual users of the service. Comments can belong to several people, and can be positive (+), negative (-) or other (~). This post will be updated periodically. Hosting company: Webfaction Type of service: latest web2py version: Python version: 2.4/3.2 OS version:

Re: [web2py] web2py hosting

2011-07-01 Thread Martín Mulone
También está dot_cloud cuando yo lo probé en la beta, y web2py corría bien, ahora salió de la beta no se como andará en costos https://www.dotcloud.com/pricing/ Si alguien lo prueba avise. 2011/7/1 DenesL denes1...@yahoo.ca Information collected from actual users of the service. Comments can

Re: [web2py] Inline Table Editor.

2011-07-01 Thread Richard Vézina
I think powertable Bruno's plugin integration of Datatables was allowing inline edition... Look here : http://powertable.blouweb.com/ and there : http://www.datatables.net/ Good luck. Richard On Fri, Jul 1, 2011 at 12:48 PM, David J. da...@styleflare.com wrote: Anyone know of a good jquery

[web2py] Re: BUG: I think.

2011-07-01 Thread Anthony
If you don't specify an extension in URL(), I think it will just use the extension of the current request, which is .load in this case. Try explicitly setting extension=False: {{=URL('default','campaigns',args=['edit',n.id],extension=False)}} Anthony On Friday, July 1, 2011 1:24:11 PM

Re: [web2py] BUG: I think.

2011-07-01 Thread Martín Mulone
you can pass extension=0 to the URL URL('default','campaigns',**args=['edit',n.id],extension=0) 2011/7/1 David J. da...@styleflare.com I am running latest in trunk. I have this code being called from a LOAD function; I see it appends the '.load' to the generated URL When I think it

Re: [web2py] BUG: I think.

2011-07-01 Thread Jonathan Lundell
On Jul 1, 2011, at 10:45 AM, Martín Mulone wrote: you can pass extension=0 to the URL URL('default','campaigns',args=['edit',n.id],extension=0) extension=False would be prettier. 2011/7/1 David J. da...@styleflare.com I am running latest in trunk. I have this code being called from

[web2py] Error in IS_IN_DB: wrong T()

2011-07-01 Thread Martin Weissenboeck
Hi, using the T() class in IS_IN_SET yields a strange result: In this environment *T* does not depend on the language choosen by T.force but *depends only on the language used in the setup of the browser.* Tested with Google Chrome, Safari Here are some lines of code to verify: This is my

[web2py] Good syntax checker recommendations?

2011-07-01 Thread pbreit
I just use text mate on a Mac and with syntax highlighting I rarely have syntax errors. And I never have import errors (since there's very little importing necessary).

Re: [web2py] Good syntax checker recommendations?

2011-07-01 Thread Jonathan Lundell
On Jul 1, 2011, at 11:03 AM, pbreit wrote: I just use text mate on a Mac and with syntax highlighting I rarely have syntax errors. And I never have import errors (since there's very little importing necessary). I've been using pyflakes, mainly because it's trivial to configure and run. The

Re: [web2py] BUG: I think.

2011-07-01 Thread Anthony
And make sure you don't do extension=None -- that's what it's set to by default, and in that case, it will just use request.extension, which you don't want. You have to explicitly set extension=False (or 0). Anthony On Friday, July 1, 2011 1:53:27 PM UTC-4, Jonathan Lundell wrote: On Jul

Re: [web2py] BUG: I think.

2011-07-01 Thread pbreit
I usually do extension=''

[web2py] counter implementation

2011-07-01 Thread weheh
With web2py, can you increment an integer field, which is used as a counter, with just 1 call to the db? Regardless, I'm looking for the most efficient stand-alone syntax for incrementing a field. 1 line is better than 2.

[web2py] Re: counter implementation

2011-07-01 Thread Massimo Di Pierro
db(db.table.id=-id).update(db.table.field=db.table.field+1) does not work on GAE On Jul 1, 3:33 pm, weheh richard_gor...@verizon.net wrote: With web2py, can you increment an integer field, which is used as a counter, with just 1 call to the db? Regardless, I'm looking for the most efficient

Re: [web2py] Multiple Domains, Subdomains, and Applications with SSL. Single web2py Instance on Apache

2011-07-01 Thread Ovidio Marinho
Very Goog Tutorial. Congratulations. Ovidio Marinho Falcao Neto ovidio...@gmail.com 88269088 Paraiba-Brasil 2011/7/1 Ross Peoples ross.peop...@gmail.com This post is meant to be informative, as I have been trying to get this

Re: [web2py] Re: counter implementation

2011-07-01 Thread Ovidio Marinho
There is a document that says what can or can not in GAE? Ovidio Marinho Falcao Neto ovidio...@gmail.com 88269088 Paraiba-Brasil 2011/7/1 Massimo Di Pierro massimo.dipie...@gmail.com

[web2py] Re: counter implementation

2011-07-01 Thread weheh
Thanks, Massimo. On Jul 1, 4:37 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: db(db.table.id=-id).update(db.table.field=db.table.field+1) does not work on GAE On Jul 1, 3:33 pm, weheh richard_gor...@verizon.net wrote: With web2py, can you increment an integer field, which

[web2py] Re: counter implementation

2011-07-01 Thread weheh
Maybe I spoke too soon... mytab=123 db(db.mytab.id==mytab_id).update(db.mytab.cnt=db.mytab.cnt+1) SyntaxError: keyword can't be an expression

[web2py] Re: counter implementation [open]

2011-07-01 Thread weheh
On Jul 1, 5:58 pm, weheh richard_gor...@verizon.net wrote: Maybe I spoke too soon... mytab=123 db(db.mytab.id==mytab_id).update(db.mytab.cnt=db.mytab.cnt+1)   SyntaxError: keyword can't be an expression

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread Massimo Di Pierro
There are logic problems with ajax=False. Just use ajax=True. I am not sure ajax=False should be an option al all. On Jul 1, 11:45 am, LightOfMooN vladsale...@yandex.ru wrote: Thx, but I just disabled some components until the new stable version of webpy :) On 1 июл, 21:29, Anthony

[web2py] Re: counter implementation [open]

2011-07-01 Thread Massimo Di Pierro
db(db.mytab.id==mytab_id).update(cnt=db.mytab.cnt+1) On Jul 1, 4:59 pm, weheh richard_gor...@verizon.net wrote: On Jul 1, 5:58 pm, weheh richard_gor...@verizon.net wrote: Maybe I spoke too soon... mytab=123 db(db.mytab.id==mytab_id).update(db.mytab.cnt=db.mytab.cnt+1)  

[web2py] Janrain alternative: Google Identity Toolkit

2011-07-01 Thread Plumo
Google is launching their own login service: https://sites.google.com/site/gitooldocs/home Has anyone been granted an account for testing yet?

[web2py] Re: counter implementation [almost closed]

2011-07-01 Thread weheh
Thanks, that works now. My head is fuzzy today after all I've been through. I had tried this: db.mytab[mytab_id]=dict(cnt=db.mytab.cnt+1) but that didn't work. Is there a shortcut syntax to do this? Just curious, as the longcut is clearly just as short.

[web2py] Re: counter implementation [almost closed]

2011-07-01 Thread Massimo Di Pierro
This is the shortcut db(db.mytab.id==mytab_id).update(cnt=db.mytab.cnt+1) because it does it in one SQL statement Other ways, when they work, are equivalent to row = db.mytab(mytab_id) row.update_record(cnt=row.nct+1) ie.e. two statements. On Jul 1, 7:59 pm, weheh richard_gor...@verizon.net

Re: [web2py] Re: counter implementation

2011-07-01 Thread Bruno Rocha
On Fri, Jul 1, 2011 at 6:58 PM, weheh richard_gor...@verizon.net wrote: mytab=123 db(db.mytab.id==mytab_id).update(db.mytab.cnt=db.mytab.cnt+1) SyntaxError: keyword can't be an expression try with a lambda (I did not tested, but as lambda returns a valuem could work. mytab=123

Re: [web2py] Re: counter implementation

2011-07-01 Thread Bruno Rocha
forget the lambda.. the problem is the key mytab=123 db(db.mytab.id==mytab_id).update(*cnt*=db.mytab.cnt+1 ) SyntaxError: keyword can't be an expression

[web2py] counter implementation [closed]

2011-07-01 Thread weheh
Thanks all.

[web2py] Question on menu active rendering

2011-07-01 Thread ron_m
In response.menu each item of the list is a 4 element tuple. The second element of tuple can be True or False to represent that item is active. This causes teh MENU class in gluon/html.py to attach class=web2py-menu-active to the li tag associated with that menu item. That class is not

[web2py] Re: Question on menu active rendering

2011-07-01 Thread ron_m
Oops I found it, simple once you know how. In layout.html do the following Change jQuery('ul.sf-menu').superfish();}); To jQuery('ul.sf-menu').superfish({pathClass: 'web2py-menu-active'});}); This will allow suckerfish to use the class added to the active menu item by the