[web2py] How to use maps in plugin_wiki

2012-09-17 Thread Philip Kilner
Hi, I'd like to embed a map in a view, and am trying to use plugin_wiki. I have plugin_wiki installed, and when I use a simpler function, like the YouTube example: - {{=plugin_wiki.widget('youtube',code='l7AWnfFRc7g')}} ...all is well. However, if I try to embed a map, I get a ticket with:

[web2py] Re: ProgrammingError: Cannot operate on a closed database

2012-09-17 Thread Paolo
Dear all, occasionally, I am getting this error too (with and without lazy_table) Which OS are you using ? Could you post your db model? Paolo On Monday, September 17, 2012 7:21:42 AM UTC+2, mweissen wrote: I have read some threads about this error message - I got it too: Version web2py™

[web2py] Re: multiple controllers under linux environment

2012-09-17 Thread David Marko
Check following: a) linux is case sensitife on files - check filenames and their references in web2py b) check correct os level permissions on files ... so web2py can see read them ... Dne pondělí, 17. září 2012 6:01:09 UTC+2 Vladimir Makarov napsal(a): I use different controller files: +

Re: [web2py] Re: ProgrammingError: Cannot operate on a closed database

2012-09-17 Thread Martin Weissenboeck
From the /var/log/apache2/error.log: [Mon Sep 17 09:39:09 2012] [error] ERROR:web2py:Traceback (most recent call last): [Mon Sep 17 09:39:09 2012] [error] File /users/www-data/web2py/gluon/main.py, line 547, in wsgibase [Mon Sep 17 09:39:09 2012] [error] session._try_store_on_disk(request,

[web2py] Which resource bundling framework / approach to use with web2py?

2012-09-17 Thread dlypka
Debugging web2py web apps under WING IDE for me is quite slow because each resource (.js, .css) is loaded individually and quite slowly on each request. I noticed the latest Microsoft .NET MVC 4.0 has resource bundling built-in to Visual Studio 2012 and it is automatic. I have researched

Re: [web2py] Re: SQLTABLE, orderby and components

2012-09-17 Thread Massimiliano
Just add an argument cid=None to SQLTABLE.__init__ and change line 2408-9 from row.append(TH(A(headers.get(c, c), _href=th_link+'?orderby=' + c))) to row.append(TH(A(headers.get(c, c),

[web2py] boolean field value shows up as gluon.dal.Set object

2012-09-17 Thread weheh
I changed a postgres table to add a field Field('dq',boolean', default=False, readable=False, writable=False), I may have made another postgres table change at the same time. Later, I set the values of mytable.dq to False throughout the db. Subsequently, when querying the value of dq for a row

[web2py] Active pages in plugin_wiki

2012-09-17 Thread Martin Weissenboeck
I have a plugin_wiki and I want to have active pages. Let's look at the page meta-menu (but it is the same for all other pages): (1) A screenshot of http://127.0.0.1:8000/init/plugin_wiki/index pages meta-menu is not active System PagesCurrent Pagesmeta-menuMeta menu

[web2py] Error on incorrect login - 'NoneType' object has no attribute 'count'

2012-09-17 Thread Bruno Rocha
When user password is incorrect I am getting this *File /home/www-data/web2py/gluon/validators.py in __eq__ at line 2596* código argumentos variáveis Function argument list (self=gluon.validators.LazyCrypt object, stored_password=None) Code listing 2591. 2592. 2593. 2594. 2595. 2596. 2597.

Re: [web2py] Re: ProgrammingError: Cannot operate on a closed database

2012-09-17 Thread Massimo Di Pierro
Looks like the problem is that you try pus something in session that is not pickleable. On Monday, 17 September 2012 02:59:54 UTC-5, mweissen wrote: From the /var/log/apache2/error.log: [Mon Sep 17 09:39:09 2012] [error] ERROR:web2py:Traceback (most recent call last): [Mon Sep 17 09:39:09

Re: [web2py] Re: SQLTABLE, orderby and components

2012-09-17 Thread Massimo Di Pierro
but there is no cid variable in sqlhtml.py. I am missing something? Can you send me a patch and I will try it? On Monday, 17 September 2012 03:39:30 UTC-5, Massimiliano wrote: Just add an argument cid=None to SQLTABLE.__init__ and change line 2408-9 from

[web2py] Re: Error on incorrect login - 'NoneType' object has no attribute 'count'

2012-09-17 Thread Massimo Di Pierro
Fixed in trunk. This does not happen on incorrect password. This happens if password is NULL in database which should not happen. On Monday, 17 September 2012 06:52:08 UTC-5, rochacbruno wrote: When user password is incorrect I am getting this *File /home/www-data/web2py/gluon/validators.py

[web2py] Re: Installing Windows Service (2.0.9 Win exe)

2012-09-17 Thread Massimo Di Pierro
Did you try the windows binary or the source? On Sunday, 16 September 2012 22:10:26 UTC-5, Andrew W wrote: Thanks. Well it installs OK, but won't start - just times out. Found some inconsistencies in the book: *Deployment Recipes:* In order to use web2py as a Windows service, you must

[web2py] Re: Installing Windows Service (2.0.9 Win exe)

2012-09-17 Thread Massimo Di Pierro
Also... did you try this with 1.99.7? I am trying to determine if this is a new issue, an ond issue or a packaging issue. On Sunday, 16 September 2012 22:10:26 UTC-5, Andrew W wrote: Thanks. Well it installs OK, but won't start - just times out. Found some inconsistencies in the book:

[web2py] Re: Restricting dropdown options in SQLFORM.grid in queries on hierarchical tables.

2012-09-17 Thread Mandar Vaze
What I have done as a workaround is as follows : def View(): if request.args(0) in ['edit']: redirect(URL('controller', 'myEdit', args=request.args,

Re: [web2py] Re: Error on incorrect login - 'NoneType' object has no attribute 'count'

2012-09-17 Thread Bruno Rocha
Using facebook connect and google+ user login with facebook account and password stays null. --

Re: [web2py] Re: SQLTABLE, orderby and components

2012-09-17 Thread Massimiliano
Yes, my proposal was to add an arguments cid to sqltable. I've attached a patch just to explain. Thank you On Mon, Sep 17, 2012 at 2:08 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: but there is no cid variable in sqlhtml.py. I am missing something? Can you send me a patch and I

Re: [web2py] Re: multiple controllers under linux environment

2012-09-17 Thread Richard Vézina
+1 to what David wrote! Richard On Mon, Sep 17, 2012 at 3:31 AM, David Marko dma...@tiscali.cz wrote: Check following: a) linux is case sensitife on files - check filenames and their references in web2py b) check correct os level permissions on files ... so web2py can see read them ...

Re: [web2py] Re: Restricting dropdown options in SQLFORM.grid in queries on hierarchical tables.

2012-09-17 Thread Michael Ellis
Thanks, Mandar. That looks promising. If I come up with any improvements, I'll share them here. Cheers, Mike On Mon, Sep 17, 2012 at 9:12 AM, Mandar Vaze mandarv...@gmail.com wrote: What I have done as a workaround is as follows : def View(): if request.args(0) in ['edit']:

Re: [web2py] Re: Error on incorrect login - 'NoneType' object has no attribute 'count'

2012-09-17 Thread Massimo Di Pierro
Interesting. That check should never kick in then, unless you have both auth and other in auth.settings.login_methods. On Monday, 17 September 2012 08:20:58 UTC-5, rochacbruno wrote: Using facebook connect and google+ user login with facebook account and password stays null. --

Re: [web2py] Re: SQLTABLE, orderby and components

2012-09-17 Thread Massimo Di Pierro
Makes sense. It is now in trunk. Thanks. Massimo On Monday, 17 September 2012 08:42:17 UTC-5, Massimiliano wrote: Yes, my proposal was to add an arguments cid to sqltable. I've attached a patch just to explain. Thank you On Mon, Sep 17, 2012 at 2:08 PM, Massimo Di Pierro

[web2py] Re: MySQLdb prints warnings to stdout

2012-09-17 Thread Jim Karsten
http://code.google.com/p/web2py/issues/detail?id=1007 --

Re: [web2py] Re: Error on incorrect login - 'NoneType' object has no attribute 'count'

2012-09-17 Thread Bruno Rocha
I have facebook, google and standard auth. --

Re: [web2py] Re: Error on incorrect login - 'NoneType' object has no attribute 'count'

2012-09-17 Thread Massimo Di Pierro
Now I understand. Can you check if it is fixed now? On Monday, 17 September 2012 09:51:20 UTC-5, rochacbruno wrote: I have facebook, google and standard auth. --

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

2012-09-17 Thread MichaelF
1. What will I need to import to get it to recognize 'copy'? I run the suggested code and get told that 'copy' does not exist. (I'm running 2.5; what do I conditionally import?) 2. Are we doing a copy because all the adapters share the same 'types' object? On Tuesday, August 7, 2012 3:48:35

[web2py] Re: Installing Windows Service (2.0.9 Win exe)

2012-09-17 Thread Andrew W
I used the nightly build, I'll try the source version next. --

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

2012-09-17 Thread MichaelF
I did a simple import of 'copy' and that got me by that first problem. But now I have the following problem: db.define_table('Person_certification', Field('Person', db.Person), ... Field('Pending', 'boolean', default = False), ... I get the following error on the

[web2py] Re: Changing auth validator error messages

2012-09-17 Thread Mark Li
Ok that answers my question; I would still have to define all the validators for auth_user.email (assuming there is more than one). Also just for claficiation, using the following: db.auth_user.email.requires.error_message = T() gives me the following error message: type

[web2py] Re: multiple controllers under linux environment

2012-09-17 Thread Vladimir Makarov
Thank you, David. It's just due to upper case in names of my subdirectories. Problem solved! On Monday, September 17, 2012 11:31:13 AM UTC+4, David Marko wrote: Check following: a) linux is case sensitife on files - check filenames and their references in web2py b) check correct os level

Re: [web2py] Re: File name too long?

2012-09-17 Thread Bruno Rocha
What if I change in DAL my upload fields to the length=128 then the migration will truncate the existing image names? or I need to backup and re-upload them after this? --

[web2py] Re: How to use maps in plugin_wiki

2012-09-17 Thread Philip Kilner
Hi, Having dug a bit deeper into the options available, it doesn't look like much of a chore to roll my own Google Maps integration. Looking at my choices this one: - http://code.google.com/p/jquery-ui-map/ ...looked promising, but i wondered what others were using? However, I'm now

[web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Carl
I've got a request object coming to my Web2py app's controller function. request.args[0] is another function name e.g., blastoff request.vars are parameters e.g., Storage object: {'seconds':10, 'confirm' : 'okay'} how can I call blastoff with the parameters such that I can write blastoff as...

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Bruno Rocha
The better way is def *_*blastoff(seconds, confirm): # do whatever def blastoff(): try: x = *_*blastoff(**request.vars) except Exception: x = error calling function, vars not passed or vars is wrong return dict(x=x) On Mon, Sep 17, 2012 at 2:33 PM, Carl

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Carl Roach
thanks Bruno for the quick reply. blastoff() was only an example function; note that request.args[0] can contain other function names. so, rather than x = *_*blastoff(**request.vars) how can I use the value in request.args[0] in each call? ie... I'm writing a dispatch function that will call

Re: [web2py] Removing labels from forms

2012-09-17 Thread Richard Vézina
Right! I have a questioning about placeholder attribute. I don't know what the plans about integration of html5 into web2py (since placeholder is a new attribute of input in html5), but the only place where it makes sens to set the placeholder value is at the field definition in the model I

Re: [web2py] Re: ProgrammingError: Cannot operate on a closed database

2012-09-17 Thread Martin Weissenboeck
Yes, I have stored a lot of information in session, but only strings and dicts. The application works fine on my development pc (a windows 7 pc). The problem arises after I have put the application on the target machine (ubuntu with apache2). 2012/9/17 Massimo Di Pierro massimo.dipie...@gmail.com

[web2py] Specify sender name in auth.settings.mailer

2012-09-17 Thread Mark Li
I am using 'mycomp...@gmail.com' as my email address for auth.settings.mailer.settings.sender and the sender name shows up as 'mycompany' in the received email. However, I would like to edit the sender name so it is different from 'mycompany'. Is there any way to accomplish this using the

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Bruno Rocha
Now I got it... I can see 3 ways.. but that is not so safe to do it... *option 1* def dispatcher(): def blastoff(param1, param2): return something def foo(param1, param2): return something funcname = request.args[0] params = request.vars if funcname in

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Carl Roach
Thanks Bruno - I've got it too! thanks for your help. On 17 Sep 2012, at 19:05, Bruno Rocha rochacbr...@gmail.com wrote: Now I got it... I can see 3 ways.. but that is not so safe to do it... option 1 def dispatcher(): def blastoff(param1, param2): return something

Re: [web2py] Removing labels from forms

2012-09-17 Thread Richard Vézina
Maybe the proper way to append attributes to field is by widget as Anthony wrote here : http://stackoverflow.com/questions/8661166/custom-css-classes-for-sqlform-widget-input-in-web2py/8661906#8661906 From this thread : https://groups.google.com/forum/?fromgroups=#!topic/web2py/c-0EMp26uDc

Re: [web2py] Removing labels from forms

2012-09-17 Thread Richard Vézina
That's : for f in db[request.args(0)].fields: if db[request.args(0)][f].type == 'text': db[request.args(0)][f].widget = lambda field, value: SQLFORM.widgets.text.widget(field, value, _placeholder='test123') Richard On Mon, Sep 17, 2012 at 2:22 PM,

[web2py] Active pages in plugin_wiki

2012-09-17 Thread Martin Weissenboeck
Ok - I have found the answer myself: The word none does not mean not active - it means the *role*. But one proposal remains: In the page editor there is no checkbox after the word Active: - please add it! --- 2012/9/17 Martin Weissenboeck mweis...@gmail.com I have a

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

2012-09-17 Thread Massimo Di Pierro
Field('Pending' upper case ... type 'exceptions.KeyError' 'pending' lower case On Monday, 17 September 2012 11:37:13 UTC-5, MichaelF wrote: I did a simple import of 'copy' and that got me by that first problem. But now I have the following problem:

[web2py] Re: Changing auth validator error messages

2012-09-17 Thread Massimo Di Pierro
sorry. Try: db.auth_user.email.requires[0].error_message = T() On Monday, 17 September 2012 11:40:24 UTC-5, Mark Li wrote: Ok that answers my question; I would still have to define all the validators for auth_user.email (assuming there is more than one). Also just for claficiation,

Re: [web2py] Re: File name too long?

2012-09-17 Thread Massimo Di Pierro
This may not trigger a migration if it causes data truncation. You may have to do it manually (create a dumy field, move data in there with a script, and then move it back). On Monday, 17 September 2012 11:54:04 UTC-5, rochacbruno wrote: What if I change in DAL my upload fields to the

Re: [web2py] Removing labels from forms

2012-09-17 Thread Anthony
I tend to agree -- we already have label and comment -- why not placeholder? Anthony On Monday, September 17, 2012 1:53:39 PM UTC-4, Richard wrote: Right! I have a questioning about placeholder attribute. I don't know what the plans about integration of html5 into web2py (since

Re: [web2py] Re: ProgrammingError: Cannot operate on a closed database

2012-09-17 Thread Massimo Di Pierro
You error seems to indicate there is a lock object in session. Can you try check by printing the session.keys() before saving the session? On Monday, 17 September 2012 12:54:54 UTC-5, mweissen wrote: Yes, I have stored a lot of information in session, but only strings and dicts. The

Re: [web2py] Removing labels from forms

2012-09-17 Thread Bruno Rocha
input type= value= placeholder= required=required / required is another usefull html5 validator, but we already have required in models but it is not reflected in widgets, maybe for compatibility it needs a html_required=True --

[web2py] Re: how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Anthony
Maybe make a dictionary of functions, then map request.args(0) to the dictionary keys to identify the right function to call (that way if someone tampers with the URL, they can't call any function that's not in the dictionary). Anthony On Monday, September 17, 2012 1:33:26 PM UTC-4, Carl

[web2py] Re: Specify sender name in auth.settings.mailer

2012-09-17 Thread Massimo Di Pierro
Looks like there is not but there should be. Can you please open a ticket about this? On Monday, 17 September 2012 12:57:10 UTC-5, Mark Li wrote: I am using 'myco...@gmail.com javascript:' as my email address for auth.settings.mailer.settings.sender and the sender name shows up as

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Carl Roach
Great idea. But if I use Bruno option #3 and avoid adding other functions to the module I won't have to repeat myself. On Monday, 17 September 2012, Anthony wrote: Maybe make a dictionary of functions, then map request.args(0) to the dictionary keys to identify the right function to call

[web2py] Re: Active pages in plugin_wiki

2012-09-17 Thread Massimo Di Pierro
I am not planning to support plugin_wiki any more. Except for comments and ratings everything else is in auth.wiki() and works better. I plan to revamp coe2py or cms2py to use auth.wiki() On Monday, 17 September 2012 13:39:21 UTC-5, mweissen wrote: Ok - I have found the answer myself: The

Re: [web2py] Beginner trying to adapt the Chapter 11 ajax function 'echo' example

2012-09-17 Thread AnnG
Hi, thanks for your post. I tried your suggestion, but still can't get it to work, here is my new code: * {{extend 'layout.html'}} script $(function(){ $('.myactions li').click(function(){ elem = $(this); url = elem.attr('data-url');

[web2py] HTTPS admin access has stopped working

2012-09-17 Thread David Phillips
I had a web2py 1.99.7 app running on Elastic Beanstalk. I was able to use the admin interface over https. I then upgraded web2py to 2.0.8 and uploaded it to EB. Now I am getting this message when I try to access the admin interface over HTTPS: ATTENTION: Login requires a secure (HTTPS)

Re: [web2py] Beginner trying to adapt the Chapter 11 ajax function 'echo' example

2012-09-17 Thread Bruno Rocha
you need to use # on id selectors $(#selector_id) function parse_my_data(data){ $('*#*target').append(data); $('*#*target').append(P('hello', XML('bworld/b'))); } --

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

2012-09-17 Thread MichaelF
Thanks. However, I refer to that field with upper case in all places. Can you tell me where the lower case 'pending' comes from? The field name has always been defined as upper case, and the app has been working up until I made that latest change. So I went into the db and changed the field

Re: [web2py] Beginner trying to adapt the Chapter 11 ajax function 'echo' example

2012-09-17 Thread Ann Gledson
That works. THANKS! On Mon, Sep 17, 2012 at 8:16 PM, Bruno Rocha rochacbr...@gmail.com wrote: you need to use # on id selectors $(#selector_id) function parse_my_data(data){ $('*#*target').append(data); $('*#*target').append(P('hello', XML('bworld/b'))); } -- --

Re: [web2py] HTTPS admin access has stopped working

2012-09-17 Thread Richard Vézina
You probably had erase you parameters.py file when you install the new version... Did you made a backup? If so, just copy/paste the 443 parameters py files from the archive into the web2py folder of the new 2.0.8 installation. If you didn't make a backup, what you can do is in order to create a

Re: [web2py] HTTPS admin access has stopped working

2012-09-17 Thread Bruno Rocha
assuming your webserver user is www-data and desired password 123456 cd path/to/web2py sudo -u www-data python -c from gluon.main import save_password; save_password('123456',443) --

[web2py] Is it possible to remove row from rows result created from DB?

2012-09-17 Thread Kenny
Basically, I get the place data with longitude and latitude, calculate it if it's more than 3000 miles, remove that row from Rows. I am sure that this is wrong. If I can remove the row from fetch rows, how can I add extra columns to the rows for distance between two points? P.S the result has

Re: [web2py] Is it possible to remove row from rows result created from DB?

2012-09-17 Thread Bruno Rocha
In my experience working with this I fired out that it is better to use haversine directly on database, you can find haversine functions for MySQL, Postgres and even for SQlite. I dont know how one can write haversine with DAL api, but you can do it with executesql() as you are going to turn this

Re: [web2py] Is it possible to remove row from rows result created from DB?

2012-09-17 Thread Kenny Chung
Thank you. I tried executesql, I got an error saying it cannot be serialized in JSON. On Sep 17, 2012 2:58 PM, Bruno Rocha rochacbr...@gmail.com wrote: In my experience working with this I fired out that it is better to use haversine directly on database, you can find haversine functions for

[web2py] Re: IS_IN_DB(multiple=True) problems on GAE

2012-09-17 Thread howesc
that's fair. i don't know how to get the DAL to handle that based on how filters are applied when a select is executed On Saturday, September 15, 2012 3:45:30 PM UTC-7, Alan Etkin wrote: i'm undecided anyway if this should be automatic for users or if they should be forced to realize

[web2py] How to use the new cache-options for referenced table by IS_IN_DB ?

2012-09-17 Thread Omi Chiba
I want to speed up to pull the referenced table by IS_IN_DB. For example, EDXUSF00 is referencing TDMUSJ00 table which takes 10 seconds to display the form because it has about 40,000 records. I was wondring if I can cache TDMUSJ00 so that it will be faster when the form is displayed second

Re: [web2py] How to use the new cache-options for referenced table by IS_IN_DB ?

2012-09-17 Thread Bruno Rocha
IS_IN_DB receives a cache parameter so you can do db.table.field.requires = IS_IN_DB(, cache=(cache.ram, 1800)) For that number of records I would use an ajax widget with endless scroll. (http://ivaynberg.github.com/select2/#infinite) --

Re: [web2py] Re: Active pages in plugin_wiki

2012-09-17 Thread Martin Weissenboeck
Ok - let's try auth.wiki Is there any manual or description? 2012/9/17 Massimo Di Pierro massimo.dipie...@gmail.com I am not planning to support plugin_wiki any more. Except for comments and ratings everything else is in auth.wiki() and works better. I plan to revamp coe2py or cms2py to use

Re: [web2py] How to use the new cache-options for referenced table by IS_IN_DB ?

2012-09-17 Thread Omi Chiba
Yeah ! It's about 5 seconds now !! On Monday, September 17, 2012 3:22:23 PM UTC-5, rochacbruno wrote: IS_IN_DB receives a cache parameter so you can do db.table.field.requires = IS_IN_DB(, cache=(cache.ram, 1800)) For that number of records I would use an ajax widget with endless

[web2py] Re: How to use maps in plugin_wiki

2012-09-17 Thread greaneym
Phil, That plugin still works. Look in the model file that comes with the plugin. It tells you how to implement the plugin. Here is a copy of my model, controller and view files where I got it to work. You need to obtain a key from google because if more than a default number of people visit

[web2py] Re: Specify sender name in auth.settings.mailer

2012-09-17 Thread Mark Li
Yep here it is: http://code.google.com/p/web2py/issues/detail?id=1017 On Monday, September 17, 2012 12:05:40 PM UTC-7, Massimo Di Pierro wrote: Looks like there is not but there should be. Can you please open a ticket about this? On Monday, 17 September 2012 12:57:10 UTC-5, Mark Li wrote:

[web2py] Re: Changing auth validator error messages

2012-09-17 Thread Mark Li
Awesome, that worked and I didn't have to redefine the other validators for auth_user.email On Monday, September 17, 2012 11:52:38 AM UTC-7, Massimo Di Pierro wrote: sorry. Try: db.auth_user.email.requires[0].error_message = T() On Monday, 17 September 2012 11:40:24 UTC-5, Mark Li

[web2py] Pushing data to the client..

2012-09-17 Thread hiro
I am trying to port my Baduk client to an web2py app.. I have tried some writing some small programs and have no problem so far.. except.. I do not know how I should update one players board when the other make a move. I want the server to be able to sen an update to a frame or force a reload.

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

2012-09-17 Thread Massimo Di Pierro
Do you have a traceback with more information? On Monday, 17 September 2012 14:23:56 UTC-5, MichaelF wrote: Thanks. However, I refer to that field with upper case in all places. Can you tell me where the lower case 'pending' comes from? The field name has always been defined as upper case,

[web2py] Re: HTTPS admin access has stopped working

2012-09-17 Thread Massimo Di Pierro
we just made it more secure. Has others have suggested you have to re-make the parameters_*.py file. On Monday, 17 September 2012 14:15:40 UTC-5, David Phillips wrote: I had a web2py 1.99.7 app running on Elastic Beanstalk. I was able to use the admin interface over https. I then upgraded

Re: [web2py] HTTPS admin access has stopped working

2012-09-17 Thread Richard Vézina
This is nicer way of restoring it :) Thanks Bruno! Richard On Mon, Sep 17, 2012 at 3:50 PM, Bruno Rocha rochacbr...@gmail.com wrote: assuming your webserver user is www-data and desired password 123456 cd path/to/web2py sudo -u www-data python -c from gluon.main import save_password;

Re: [web2py] Re: Active pages in plugin_wiki

2012-09-17 Thread Massimo Di Pierro
def index(): return auth.wiki(manage_permissions=True or False) It should be straightforward. If it is not something is wrong. Feel free to ask questions here. I will write some documents asap. Use trunk because I renamed a field to avoid conflict. On Monday, 17 September 2012 15:26:02

Re: [web2py] How to use the new cache-options for referenced table by IS_IN_DB ?

2012-09-17 Thread Massimo Di Pierro
IS_IN_DB is incharge of building the select(*options). How many options do you get in the form. It is possible most of the time is spent in rendering the form. Perhaps you should use requires = [IS_IN_DB()] # notice the [...] and the autocomplete widget. On Monday, 17 September 2012

Re: [web2py] How to use the new cache-options for referenced table by IS_IN_DB ?

2012-09-17 Thread Omi Chiba
Your're correct. I never use autocomplete widget before but I will try it! On Monday, September 17, 2012 4:21:20 PM UTC-5, Massimo Di Pierro wrote: IS_IN_DB is incharge of building the select(*options). How many options do you get in the form. It is possible most of the time is spent in

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

2012-09-17 Thread MichaelF
Yes; here it is: 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceback (most recent call last): File gluon/restricted.py, line 205, in restricted File C:/Program Files (x86)/web2py/applications/NCAA_schedule/models/db.py http://127.0.0.1:8000/admin/default/edit/NCAA_schedule/models/db.py, line 165, in

[web2py] Read file attached from gmail

2012-09-17 Thread FERNANDO VILLARROEL
Dear All. Every day i did received a email (gmail) with a file attached (text) as rar. My question is how i can read this file attached from web2py? Or how i can download this file to /tmp folder? Any idea. Regards --

[web2py] Re: Electronic voting anybody?

2012-09-17 Thread apps in tables
Hi, I have an idea of adding youtube video to the ballo t(edit) , So, I added {{=MARKMIN(embed:http://www.youtube.com/embed/x1w8hKTJ2Co )}} but, it didn't work. is it possible ? and How ? Regards, Ashraf --

[web2py] Lazy Options plugin

2012-09-17 Thread lyn2py
Hi! I'm testing the lazy options plugin again, the website is here: http://dev.s-cubism.com/plugin_lazy_options_widget And I find that if 'form has errors', the selected value gets reset instead of being remembered (all the other fields get remembered). The code for form has errors is the

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Anthony
Sorry, when I replied I only saw Bruno's first reply. I like his option #3 as well. Anthony On Monday, September 17, 2012 3:06:51 PM UTC-4, Carl wrote: Great idea. But if I use Bruno option #3 and avoid adding other functions to the module I won't have to repeat myself. On Monday, 17

[web2py] Receiving array passed in from jQuery $.ajax() into Storage object

2012-09-17 Thread Osman Masood
Hey guys, I'm passing in an array via $.ajax: $.ajax({ data: { table: [[1, 2], [3, 4]] } type: post ... }) And request.vars (a Storage object) gets converted by jQuery into something like this: Storage {'table[0][]': ['1', '2'], 'table[1][]': ['3', '4']} And I can't use getlist()

[web2py] int() argument must be a string or a number, not 'list'

2012-09-17 Thread Andrew Evans
Hello I am running into issues updating records in my MySQL database after adding multiple=True like so Field('region', db.region, label='Region *', requires=IS_IN_DB(db,db.region.id,'%(title)s', multiple=True)), Any ideas how to fix this I am using web2py 1.99.7 *cheers and ty ;-) --

Re: [web2py] int() argument must be a string or a number, not 'list'

2012-09-17 Thread Andrew Evans
Sorry forgot to post the full Error message Traceback (most recent call last): File /var/www/web2py/gluon/restricted.py, line 205, in restricted exec ccode in environment File /var/www/web2py/applications/sc_coast/controllers/appadmin.py

Re: [web2py] Receiving array passed in from jQuery $.ajax() into Storage object

2012-09-17 Thread Bruno Rocha
You can do something like this: In [17]: request_vars = {'table[0][]': ['1', '2'], 'table[1][]': ['3', '4']} In [18]: table = request_vars.values() In [19]: table[0] Out[19]: ['1', '2'] In [20]: table[1] Out[20]: ['3', '4'] or to be sure about the sequence. In [25]: request_vars =

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

2012-09-17 Thread Massimo Di Pierro
I cannot reproduce this error with your code in 2.0.9 and the lines in your traceback do not correspond to the source code I have. I think you may be using an older dal.py On Monday, 17 September 2012 16:43:30 UTC-5, MichaelF wrote: Yes; here it is: 1. 2. 3. 4. 5. 6. 7. 8. 9.

[web2py] Re: Electronic voting anybody?

2012-09-17 Thread Massimo Di Pierro
I will add the option. On Monday, 17 September 2012 17:35:39 UTC-5, apps in tables wrote: Hi, I have an idea of adding youtube video to the ballo t(edit) , So, I added {{=MARKMIN(embed:http://www.youtube.com/embed/x1w8hKTJ2Co )}} but, it didn't work. is it possible ? and How ?

[web2py] Re: int() argument must be a string or a number, not 'list'

2012-09-17 Thread Massimo Di Pierro
This is probably fixed in trunk. You should upgrade. On Monday, 17 September 2012 19:50:38 UTC-5, Andrew Evans wrote: Hello I am running into issues updating records in my MySQL database after adding multiple=True like so Field('region', db.region, label='Region *', requires=IS_IN_DB(db,

Re: [web2py] Re: int() argument must be a string or a number, not 'list'

2012-09-17 Thread Andrew Evans
Will do I saw it was fixed in Trunk Does Trunk mean the not released version? *cheers Andrew --

Re: [web2py] Re: int() argument must be a string or a number, not 'list'

2012-09-17 Thread Bruno Rocha
Trunk means the most recent devel version from git or hg, it is unstable but issues are fixed very quickly git clone https://github.com/web2py/web2py hg clone https://code.google.com/p/web2py --

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

2012-09-17 Thread MichaelF
Well, that's unfortunate. I've migrated this semi-manually; I had only four 'boolean' fields. Other than that, the suggested fix ( db._adapter.types['boolean']='TINYINT(1)' ) seems to work. On Monday, September 17, 2012 8:42:24 PM UTC-6, Massimo Di Pierro wrote: I cannot reproduce this error

[web2py] Re: Electronic voting anybody?

2012-09-17 Thread apps in tables
Thank you for deciding to add the option. Please, let me understand. Is adding the plugin_wiki to the voting application, will make *{{=MARKMIN(embed:http://www.youtube.com/embed/x1w8hKTJ2Co )}}* or *{{=plugin_wiki.widget('youtube',code='* *x1w8hKTJ2Co * *')}}* possible (understandable) in

Re: [web2py] Receiving array passed in from jQuery $.ajax() into Storage object

2012-09-17 Thread Osman Masood
Thanks, Bruno! I actually don't care about the order of rows so request.vars.values() worked for me. Excellent. On Monday, September 17, 2012 6:32:27 PM UTC-7, rochacbruno wrote: You can do something like this: In [17]: request_vars = {'table[0][]': ['1', '2'], 'table[1][]': ['3', '4']}