[web2py] How to keep database connection alive ?

2012-08-07 Thread Amit
Hi, I am using SQlite database for my web2py application, I have to keep the same db instance which is created at first time request comes to model db.py db = DAL('sqlite://storage.sqlite') database connection is getting closed once request is completed so I am not able to use the "db" for so

[web2py] Re: web2py 2.0 almost done

2012-08-07 Thread lyn2py
Thanks Akash for informing about downloading zip vs clone git. I also experienced that the zip download is not the most recent with changes. Cloning gets the latest. On Wednesday, August 8, 2012 1:48:10 PM UTC+8, Akash Kakkar wrote: > > > This behavior was noticed on the src downloaded as zip fro

[web2py] Re: Small bug?

2012-08-07 Thread lyn2py
Correction! Good news - the form submission works again. > However, the form%20accepted is not resolved, > The good news is correct and the form%20accepted is resolved. Previously it didn't work because I downloaded a zip instead of cloning git. It works after I clone git. > and also the m

[web2py] Re: Small bug?

2012-08-07 Thread lyn2py
I updated to the latest version of web2py.js Good news - the form submission works again. However, the form%20accepted is not resolved, and also the member welcome at the top became: Logout | | PasswordProfile On Wednesday, August 8, 2012 11:36:51 AM UTC+8, Anthony wrote: > > Yes. Massimo, I thi

[web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Akash Kakkar
This behavior was noticed on the src downloaded as zip from git hub, the web2py_src from the site works fine I am not aware if downloading zip from github is a good practice or not On Wednesday, 8 August 2012 10:44:39 UTC+5:30, Akash Kakkar wrote: > > I am unable to use ajax save (ctrl+S) in th

Re: [web2py] Re: Upload error field *_newfilename does not belong to the table

2012-08-07 Thread paolo.vall...@gmail.com
Hi Massimo, With the last trunk is now fixed. thank you! For what concerns the backward compatibility I haven't used this field either. Regards, paolo 2012/8/7 Massimo Di Pierro : > I think this is fixed in trunk, although fixing this may be a backward > compatibility issues. > > When web2py uploa

[web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Akash Kakkar
I am unable to use ajax save (ctrl+S) in the new version after editing the file. ctrl+S opens file save dialog. The button save button on top of file editor does not work for me. Thanks Akash On Tuesday, 7 August 2012 10:03:48 UTC+5:30, Massimo Di Pierro wrote: > > Web2py 2.0 is almost done. >

[web2py] Implementing a messaging system

2012-08-07 Thread shartha
Hi, I'd like to implement a messaging system (between the users of the website), and I need help to implement it. The way I've done it is to create a message table that has fields for the sender, receiver, subject, body, two boolean fields that shows whether the sender or the receiver have del

[web2py] Re: Search in Web2Py

2012-08-07 Thread Anthony
There's nothing built in (would be nice, though), but web2py should work fine with any standard search functionality (e.g., SQLite and Postgres full text search, Whoosh, Sphinx, Solr, ElasticSearch, Searchify, etc.). Anthony On Tuesday, August 7, 2012 11:27:51 PM UTC-4, Mike Girard wrote: > > I

Re: [web2py] Search in Web2Py

2012-08-07 Thread Alec Taylor
We were just discussing this earlier today, see: https://groups.google.com/forum/#!topic/web2py/CzE8JhoCxeo On 08/08/2012 1:51 PM, "Mike Girard" wrote: > I notice that there is no search box on the main web2py site. The search > on the book site is somewhat unorthodox in that it only provides li

[web2py] webservice PySimpleSOAP howto get a table as result

2012-08-07 Thread falupy
Hi all I need to create a webserivce with PySimpleSOAP for compatibility reasons, and need to return results in a table format with data from a survey. (My data is in a db and the result will be a query) I looked at the examples of implementation of both the manual and the cookbook that are ve

[web2py] Search in Web2Py

2012-08-07 Thread Mike Girard
I notice that there is no search box on the main web2py site. The search on the book site is somewhat unorthodox in that it only provides links where the search term is located but does not show you where. Does web2py have a robust, conventional search utility? If not, what is the prescribed me

[web2py] Re: Small bug?

2012-08-07 Thread Anthony
Yes. Massimo, I think http://code.google.com/p/web2py/source/detail?r=65caec4dae5f7c971d406beb0eb3b32f471d84a4 broke Ajax form submission. Anthony On Tuesday, August 7, 2012 11:20:44 PM UTC-4, lyn2py wrote: > > I've discovered a difference between the previous and the new is the form > submis

[web2py] Re: google code issues

2012-08-07 Thread Massimo Di Pierro
:-) On Tuesday, 7 August 2012 22:16:21 UTC-5, Anthony wrote: > > OK, we now have 49 defects and 30 enhancements. > > Anthony > > On Tuesday, August 7, 2012 10:18:51 PM UTC-4, Massimo Di Pierro wrote: >> >> I'd appreciate if you could do it. >> >> On Tuesday, 7 August 2012 21:01:24 UTC-5, Anthony w

[web2py] Re: Small bug?

2012-08-07 Thread lyn2py
I've discovered a difference between the previous and the new is the form submission. The old version post has parameters for application/x-www-form-urlencoded. The new version post has no parameters. So it seems that the form was not POSTed at all? On Wednesday, August 8, 2012 11:06:53 AM UTC

[web2py] Re: google code issues

2012-08-07 Thread Anthony
OK, we now have 49 defects and 30 enhancements. Anthony On Tuesday, August 7, 2012 10:18:51 PM UTC-4, Massimo Di Pierro wrote: > > I'd appreciate if you could do it. > > On Tuesday, 7 August 2012 21:01:24 UTC-5, Anthony wrote: >> >> Looks like a large number of the issues are actually enhancement

[web2py] Re: Small bug?

2012-08-07 Thread lyn2py
Ok, I found web2py.js. It is in the static folder of the app. I took the new one from welcome app and replaced the one in my app. Now my code wouldn't work (my form was not processed). I'm still trying to find out why. Any pointers will be helpful. Thanks. On Wednesday, August 8, 2012 9:22:23 AM

[web2py] Re: Small bug?

2012-08-07 Thread Massimo Di Pierro
I agree this is not a big deal. It will not break apps but will only result in corrupted messages in some rare cases and it is easy to fix by upgrading web2py.js. On Tuesday, 7 August 2012 21:07:37 UTC-5, Anthony wrote: > > On Tuesday, August 7, 2012 9:52:30 PM UTC-4, Massimo Di Pierro wrote: >

[web2py] Re: google code issues

2012-08-07 Thread Massimo Di Pierro
I'd appreciate if you could do it. On Tuesday, 7 August 2012 21:01:24 UTC-5, Anthony wrote: > > Looks like a large number of the issues are actually enhancements, but > they're all labeled as defects. I think it would be helpful to distinguish > between the two so we can more easily target real

[web2py] Re: Small bug?

2012-08-07 Thread Anthony
On Tuesday, August 7, 2012 9:52:30 PM UTC-4, Massimo Di Pierro wrote: > > This raises an issue. If somebody is using web2py 2.0 with a legacy app > and the old web2py.js there may be problems with flash. > > On Tuesday, 7 August 2012 20:22:23 UTC-5, Anthony wrote: >> >> I cannot reproduce the prob

[web2py] Re: google code issues

2012-08-07 Thread Anthony
Looks like a large number of the issues are actually enhancements, but they're all labeled as defects. I think it would be helpful to distinguish between the two so we can more easily target real defects. I don't mind changing some of the labels if you don't mind getting a bunch of notification

[web2py] Re: Small bug?

2012-08-07 Thread Massimo Di Pierro
This raises an issue. If somebody is using web2py 2.0 with a legacy app and the old web2py.js there may be problems with flash. On Tuesday, 7 August 2012 20:22:23 UTC-5, Anthony wrote: > > I cannot reproduce the problem. Do you have the absolutely latest trunk, > including the latest web2py.js?

[web2py] google code issues

2012-08-07 Thread Massimo Di Pierro
Today we closed 48 issues on google code. There are 79 remaining. Some of them the are duplicates. Some of them are are requests for improvements that will probably not be addressed in web2py 2.0. Please check this to make sure your favorite issue was not prematurely closed. If you think an is

[web2py] Re: Simple ? How to remove Form Name (form :) from FORM Helper

2012-08-07 Thread Anthony
> > {{extend 'layout.html'}} > RAM_Contact_Form: Contact Us > > > {{=BEAUTIFY(response._vars)}} > > OK, I guess you lifted the BEAUTIFY() line from the generic.load example. That helper is only used to "beautify" complex Python objects, like nested lists and dictionaries (see http://web2py.com/

[web2py] Re: Small bug?

2012-08-07 Thread Anthony
I cannot reproduce the problem. Do you have the absolutely latest trunk, including the latest web2py.js? Anthony On Tuesday, August 7, 2012 5:16:06 PM UTC-4, lyn2py wrote: > > My code is simple > > form=SQLFORM(db.category) > if form.process().accepted: > response.flash = 'form a

Re: [web2py] Re: web2py hangs while creating the mysql tables

2012-08-07 Thread Yarin
Massimo- steps to reproduce (using rocket/mysql/OSX): 1) In db.py pointing to MySQL: db.define_table('bad', Field('field_a', 'string'), Field('long', 'string') ) 2) Make a request. The app will error out and SQL syntax error will be ticketed. 3) Make another request. App requests now hang.

Re: [web2py] Re: free search API | Zero-click Info API duckduckgo.com

2012-08-07 Thread Massimo Di Pierro
This is an interesting idea. On Tuesday, 7 August 2012 17:35:07 UTC-5, Michele Comitini wrote: > > I am (quite) sure it does not. > Just putting down some ideas... > > What would be nice is to have a search API that is consistent whether > data is local, remote or the internet. One could set t

Re: [web2py] Re: Simple ? How to remove Form Name (form :) from FORM Helper

2012-08-07 Thread Rob_McC
rochacbruno: * * Thanks! It worked, and email is sent, and form: is no longer there. I'm going to to a working sample - might be helpful to others. Rob {{extend 'layout.html'}} RAM_Contact_Form: Contact Us {{=form}} On Tuesday, August 7, 2012 6:30:01 PM UTC-4, rochacbruno wrote: > > rep

Re: [web2py] Re: free search API | Zero-click Info API duckduckgo.com

2012-08-07 Thread Michele Comitini
I am (quite) sure it does not. Just putting down some ideas... What would be nice is to have a search API that is consistent whether data is local, remote or the internet. One could set the "scope" of the search (internet|remote|local). A local search could have more optional parameters since th

Re: [web2py] Re: Simple ? How to remove Form Name (form :) from FORM Helper

2012-08-07 Thread Bruno Rocha
replace this: {{=BEAUTIFY(response._vars)}} with this: {{=form}} --

[web2py] Re: in trunck - cannot access web2py site with IE when it's running under apache

2012-08-07 Thread Massimo Di Pierro
It is probably because of this line in gluon/main.py if not is_valid_ip_address(request.client): raise HTTP(400,"Bad Request") Can you log the request.client value for you when it fails? On Tuesday, 7 August 2012 16:02:51 UTC-5, Omi Chiba wrote: > > I'm testing latest version in trun

[web2py] Re: in trunck - confirm navigation pop up

2012-08-07 Thread Massimo Di Pierro
I can confirm. This needs more work to be made conditional to not saving edits I hope to be done tonight but I could use some help. ;-) All relevant code is the JS in admin/views/default/edit.html On Tuesday, 7 August 2012 15:55:30 UTC-5, Omi Chiba wrote: > > > > On Tuesday, August 7, 2012 3

Re: [web2py] Re: Appengine CPU cycles

2012-08-07 Thread Massimo Di Pierro
Please share you benchmarks when you think you are done. On Tuesday, 7 August 2012 14:29:51 UTC-5, Felipe Meirelles wrote: > > Well, I'm still in the middle of tests but all points to a huge drop on > cpu usage using a model less aproch. I've made, in a few days ill post > numbers, but the cpu_m

[web2py] Re: Upload error field *_newfilename does not belong to the table

2012-08-07 Thread Massimo Di Pierro
I think this is fixed in trunk, although fixing this may be a backward compatibility issues. When web2py uploads a file (in you case in field picture) the new file name is stored in both form.vars.picture form.vars.picture_newfilename (for backward compatibility) I see the latter is problemati

[web2py] Re: Simple ? How to remove Form Name (form :) from FORM Helper

2012-08-07 Thread Rob_McC
My goal, is to have a simple email form that can be customized... What I have is working, except for the form: being displayed. I wonder if there is a simpler way to create a email form. Thanks Rob --

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

2012-08-07 Thread Massimo Di Pierro
On can always do: db=DAL('mssql://...') db._adapter.types = copy.copy(db._adapter.types) db._adapter.types['boolean']='TINYINT(1)' It should work. Can you please check it? On Tuesday, 7 August 2012 11:56:59 UTC-5, Osman Masood wrote: > > However, web2py maintains the promise of backwards compati

Re: [web2py] Re: free search API | Zero-click Info API duckduckgo.com

2012-08-07 Thread Massimo Di Pierro
I am not sure duckduckgo has anything to do with full-text search of own data. perhaps we can integrate whoosh in DAL. perhaps we can add duckduckgo api search in contrib. On Tuesday, 7 August 2012 11:52:36 UTC-5, Michele Comitini wrote: > > Massimo has already integrated whoosh to some ext

Re: [web2py] Re: web2py hangs while creating the mysql tables

2012-08-07 Thread Massimo Di Pierro
can you reproduce. If this is a web2py problem, it needs to be fixed. On Tuesday, 7 August 2012 10:41:27 UTC-5, Yarin wrote: > > Think it actually does return a non-specific SQL syntax error that gets > ticketed by web2py- but web2py never goes to an error screen and the > browser just hangs- i

[web2py] Re: Simple ? How to remove Form Name (form :) from FORM Helper

2012-08-07 Thread Rob_McC
Thanks Anthony. Yes, my function ends in *RAM_Contact_Us/controllers/default.py* with... return dict(form=form) *RAM_Contact_Us/views/default/contactus.html* contains only this: {{extend 'layout.html'}} RAM_Contact_Form: Contact Us {{=BEAUTIFY(response._vars)}} Here is entire Function

[web2py] Re: Small bug?

2012-08-07 Thread lyn2py
My code is simple form=SQLFORM(db.category) if form.process().accepted: response.flash = 'form accepted' elif form.errors: response.flash = 'form has errors' return dict(form=form) views is using generic.load to LOAD into a dialog via ajax. I'm using the latest tr

[web2py] in trunck - cannot access web2py site with IE when it's running under apache

2012-08-07 Thread Omi Chiba
I'm testing latest version in trunk ("Version 2.0.0 (2012-08-07 14:30:28) dev"). My web2py site is running under apache by thismethod on my PC (computer name: ochiba-183) It works fine when I access my test site

[web2py] autocomplete help_fields

2012-08-07 Thread lyn2py
Hi, I noticed that autocomplete has help_fields = [], help_string may I know what it is used for? I tried it but it renders the autocomplete useless. Also, how can I search more than one field? (I suspect, maybe thru the use of virtual / computed fields?) Thanks! --

[web2py] in trunck - confirm navigation pop up

2012-08-07 Thread Omi Chiba
I'm testing latest version in trunk ("Version 2.0.0 (2012-08-07 14:30:28) dev"). While I'm using editing mode and click "back" button, it pop up the confirmation navigation screen regardless if I save or not. I'm using the google chrome. Does anyone has the same problem ? --

[web2py] webservice PySimpleSOAP howto get a table as result

2012-08-07 Thread Fabio Lugo
Hi all I need to create a webserivce with PySimpleSOAP for compatibility reasons, and need to return results in a table format with data from a survey. (My data is in a db and the result will be a query) I looked at the examples of implementation of both the manual and the cookbook that are very

[web2py] Re: Small bug?

2012-08-07 Thread Anthony
Are you using trunk (if not, can you try it -- including the trunk version of web2py.js)? Can you show your code? Anthony On Tuesday, August 7, 2012 4:21:16 PM UTC-4, lyn2py wrote: > > Spotted a small bug in response.flash: > > Normally when we submit a form, response.flash will appear "form acc

[web2py] Re: Simple ? How to remove Form Name (form :) from FORM Helper

2012-08-07 Thread Anthony
I assume that's not the complete code, as your function doesn't return anything. Does it end with something like: return dict(form=form, ...) And are you using a generic view (i.e., have you defined a contactus.html view)? If you use a generic view and pass a dictionary with more than one

[web2py] Simple ? How to remove Form Name (form :) from FORM Helper

2012-08-07 Thread Rob_McC
I'm sure it is easy, but I couldn't figure it out. *Q:* *How do you remove the* *form :* *from the table generated with FORM() helper.* * * See red box on screen shot. *Reason*: I'm building a tutorial on how to do a simple Email form in web2py. Thanks! ~Rob def contactus(): form=FORM(TABL

[web2py] Small bug?

2012-08-07 Thread lyn2py
Spotted a small bug in response.flash: Normally when we submit a form, response.flash will appear "form accepted" However if it is a form submitted within dialog box, response.flash will appear "form%20accepted" --

[web2py] Re: How to use formkey with forms defined in the view?

2012-08-07 Thread Yarin
Anthony- you're right on both counts- sloppy copy and pasting on my part- edited my previous post, everything works. Thanks!- On Tuesday, August 7, 2012 2:47:57 PM UTC-4, Anthony wrote: > > OK- figured this out, mostly. Anthony's answer worked, but only after I >> added session to the .accepts(.

Re: [web2py] Re: Appengine CPU cycles

2012-08-07 Thread Felipe Meirelles
Well, I'm still in the middle of tests but all points to a huge drop on cpu usage using a model less aproch. I've made, in a few days ill post numbers, but the cpu_ms is arround half of it was. I've set all db.define_table() in separete models, and just include them where i use them. Also, all the

Re: [web2py] Re: Appengine CPU cycles

2012-08-07 Thread Anthony
> > The app I'm developing is highly dependent on auth. > > Does it mean that any request that uses auth won't be faster than 200ms on > GAE? > Note, if you're just checking for login, I don't think you need to call auth.define_tables() (that should only be needed for registration, login, and

Re: [web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Anthony
> > Nah, I'm pretty sure jQuery UI is a little too heavy for our needs. > The required autocomplete code is 20KB minified (before gzipping), so not that bad, and it has a lot of functionality. > Maybe just the bootstrap autocomplete plugin? > Something like this may be OK too, though not qui

[web2py] Re: variables to determine table columns from database

2012-08-07 Thread Larry Wapnitsky
damned periods! :) Thanks, Anthony On Tuesday, August 7, 2012 2:49:53 PM UTC-4, Anthony wrote: > > rows = db(db[request.args(0)][request.args(2)] == request.args(1)).select > ( > > Anthony > > On Tuesday, August 7, 2012 2:15:09 PM UTC-4, Larry Wapnitsky wrote: >> >> from a web page, i'm able

[web2py] Re: IS_NOT_IN_DB on three fields

2012-08-07 Thread Anthony
Did you move that validator from the promoPositionID field to the nodeID field? The second version of the validator is checking for unique values in the nodeID field, not the promoPositionID field, so the validator belongs on the nodeID field. If you want it on the promoPositionID field, then it

[web2py] Re: Mistake in the web2py book

2012-08-07 Thread Niphlod
yeah, scheduler docs are anyway going to be replaced as soon as web2py 2.0 is out: scheduler was heavily changed since 1.99.7 and a lot a functionality was added. On Tuesday, August 7, 2012 5:10:12 PM UTC+2, Remco K wrote: > > Hi, > > I found a little mistake in the Web2Py-book but i dont know i

[web2py] Re: variables to determine table columns from database

2012-08-07 Thread Anthony
rows = db(db[request.args(0)][request.args(2)] == request.args(1)).select ( Anthony On Tuesday, August 7, 2012 2:15:09 PM UTC-4, Larry Wapnitsky wrote: > > from a web page, i'm able to successfully query my database using the > following: > > rows = db(db[request.args(0)].id == request.args(

[web2py] Re: How to use formkey with forms defined in the view?

2012-08-07 Thread Anthony
> > OK- figured this out, mostly. Anthony's answer worked, but only after I > added session to the .accepts(...) args // and or used > form.process(...).accepted instead. > Yes, the formkey is stored in the session, so you have to pass the session to form.accepts() for the formkey to be create

[web2py] variables to determine table columns from database

2012-08-07 Thread Larry Wapnitsky
from a web page, i'm able to successfully query my database using the following: rows = db(db[request.args(0)].id == request.args(1)).select( What I'm having trouble with is passing another argument that specifies another column other than id. I've tried the following with no success: ro

[web2py] Re: How to use formkey with forms defined in the view?

2012-08-07 Thread Yarin
OK- figured this out, mostly. Anthony's answer worked, but only after I added session to the .accepts(...) args // and or used form.process(...).accepted instead. Working code below: *Controller:* * * def index(): form = FORM(INPUT(_name='name')) if form.accepts(request.vars, sessi

[web2py] Re: IS_NOT_IN_DB on three fields

2012-08-07 Thread Annet
Hi Anthony, Looks like it should work. What do you mean it doesn't work? What are you > expecting, and what is happening instead? In case I enter the following records: nodeID promoPositionID sequenceNumber 2831 1 2831

[web2py] Upload error field *_newfilename does not belong to the table

2012-08-07 Thread Paolo
Hi all, I've just checked out the last trunk, I got the following error: 2012-08-07 19:26:01,063 - web2py - ERROR - Traceback (most recent call last): File "/home/paolo/Desktop/git/web2py/gluon/restricted.py", line 205, in restricted exec ccode in environment File "/home/paolo/Dropbox/

Re: [web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Annet
> Maybe just the bootstrap autocomplete plugin? > I am using the Bootstrap autocomplete (typeahead) plugin, as far as I know it styles well in IE. Annet --

[web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Dirk Krause
If you want the trunk (i.e. the latest version) I assume it's best that you do a git clone https://github.com/web2py/web2py/ and work from there. Every once and a while you will want to do a git pull to receive the latest version. Am Dienstag, 7. August 2012 18:03:24 UTC+2 schrieb Luc Chase: >

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

2012-08-07 Thread Osman Masood
However, web2py maintains the promise of backwards compatibility. One way is to have a 'tinyint_boolean' datatype for those who want to use tinyints as booleans. But that looks kind of messy and inelegant. An alternative is this: We could add a migration script to /scripts to convert all boole

Re: [web2py] Re: free search API | Zero-click Info API duckduckgo.com

2012-08-07 Thread Michele Comitini
Massimo has already integrated whoosh to some extent. Having a uniform search API layer in web2py is interesting, a matter of discussion could be if the DAL interface could be extended to do the task. mic 2012/8/7 Alec Taylor : > On Wed, Aug 8, 2012 at 1:28 AM, Massimo Di Pierro > wrote: >> This

[web2py] Re: How to use formkey with forms defined in the view?

2012-08-07 Thread Yarin
Anthony- thanks, but this isn't working for me and now I'm more confused. Why do I need to call .process() on the form again- isn't it already being processed when i do `form.accepts(...)`? Here is my updated code- it is still double posting: * Controller:* def index(): form = FORM(INPUT(

[web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Luc Chase
Where is the Ver. 2.0 system? Is it at https://github.com/web2py/web2py/ ? On Tuesday, 7 August 2012 05:33:48 UTC+1, Massimo Di Pierro wrote: > > Web2py 2.0 is almost done. > Please try the nightly build. > Let us know if it breaks anything. > > massimo > --

[web2py] Re: invalid select attribute: distinct

2012-08-07 Thread Elton Pereira de Lima
After upgrading(git pull), I got a new error. NameError: global name 'ObjectId' is not defined Traceback (most recent call last): File "/home/eltonplima/workspace/web2py/gluon/restricted.py", line 205, in restricted exec ccode in environment File "/home/eltonplima/workspace/web2py/app

Re: [web2py] Re: Appengine CPU cycles

2012-08-07 Thread Christian Foster Howes
when i last tested it it was with a very complex custom auth + validators. there are probably ways to trim it down. one thing that i did was only init mail and attach mail to auth if i was doing something that required mail. cfh On 8/7/12 6:45 , Alexei Vinidiktov wrote: The app I'm develop

Re: [web2py] Re: web2py hangs while creating the mysql tables

2012-08-07 Thread Yarin
Think it actually does return a non-specific SQL syntax error that gets ticketed by web2py- but web2py never goes to an error screen and the browser just hangs- if i recall.. On Tuesday, August 7, 2012 11:30:37 AM UTC-4, Massimo Di Pierro wrote: > > Damn MySQL. It should not hang, it should retu

[web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Dirk Krause
Sry if this is a dumb question: am I supposed to post possible bugs here or file an issue on google code? Am Dienstag, 7. August 2012 06:33:48 UTC+2 schrieb Massimo Di Pierro: > > Web2py 2.0 is almost done. > Please try the nightly build. > Let us know if it breaks anything. > > massimo > --

[web2py] Re: How to use formkey with forms defined in the view?

2012-08-07 Thread Anthony
After calling form.accepts (or form.process), the generated formkey is stored in form.formkey. You can also use form.hidden_fields() to generate the _formname and _formkey hidden fields instead of creating them manually. def index(): return dict(form=FORM(INPUT(_name='name')).process(formnam

Re: [web2py] Re: free search API | Zero-click Info API duckduckgo.com

2012-08-07 Thread Alec Taylor
On Wed, Aug 8, 2012 at 1:28 AM, Massimo Di Pierro wrote: > This is really nice. It is a single file and has simple APIs. Should we > include it in contrib? It gets my vote! - Also, it would be good to get something similar to http://haystacksearch.org/ from Django at some point. But until then,

Re: [web2py] Re: web2py hangs while creating the mysql tables

2012-08-07 Thread Massimo Di Pierro
Damn MySQL. It should not hang, it should return a operationalerror. On Tuesday, 7 August 2012 10:03:44 UTC-5, Yarin wrote: > > Change the name of in your Field('long') field in maps table - it's a > reserved keyword in MySQL and will cause it to hang. > > On Tuesday, August 7, 2012 10:57:07 AM

[web2py] Re: free search API | Zero-click Info API duckduckgo.com

2012-08-07 Thread Massimo Di Pierro
This is really nice. It is a single file and has simple APIs. Should we include it in contrib? On Tuesday, 7 August 2012 09:46:53 UTC-5, Michele Comitini wrote: > > A free search API. I like this duckduckgo engine. > > api.duckduckgo.com > > https://github.com/crazedpsyc/python-duckduckgo/ >

[web2py] Re: GAE - SQL cloud connection

2012-08-07 Thread Massimo Di Pierro
Why does 512 result in "Specified key was too long; max key length is 767 bytes". Is one counting unicode and one bytes? If setting this length to 128 is the only option, I will change it but I am afraid it may be too short to store .table files. Did you encounter any problem after this change?

Re: [web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Massimo Di Pierro
Has anybody worked out a good CSS for this? I do not think web2py ever shipped with css for the autocomplete widget. On Tuesday, 7 August 2012 07:56:57 UTC-5, Johann Spies wrote: > > On 7 August 2012 06:48, lyn2py wrote: > >> Question on the autocomplete widget: >> >> Previous post / discussions

[web2py] Re: GAE - SQL cloud connection

2012-08-07 Thread Alexei Vinidiktov
The problem still exists in the latest nightly build. Without this modification (changing the field length to 128) launching web2py on the remote GAE server gives me the error: DatabaseError: 1071: Specified key was too long; max key length is 767 bytes The whole traceback is as follows: Trac

[web2py] Mistake in the web2py book

2012-08-07 Thread Remco K
Hi, I found a little mistake in the Web2Py-book but i dont know if this is the right place to report these things. Anyway: I was reading about using the scheduler when i saw this: completed_runs = db(db.scheduler_run.status='COMPLETED').select() Which gives the error: SyntaxError: keyword ca

Re: [web2py] Re: plugin_wiki meta-menu

2012-08-07 Thread villas
Yes, that is an even better idea - it is more flexible. Thanks, On Monday, August 6, 2012 12:48:21 PM UTC+1, mweissen wrote: > > Thank you - nice solution. > I have changed it to: > > elif url.startswith('url:'): > url=URL(*(url[4:].split('/'))) > > Usage: > url:application/controller/function

Re: [web2py] Re: web2py hangs while creating the mysql tables

2012-08-07 Thread Dirk Krause
I finally understand why the app wizard prefixes every table with 't_' and every field with 'f_'. Probably a good practice anyway. Am Dienstag, 7. August 2012 17:03:44 UTC+2 schrieb Yarin: > > Change the name of in your Field('long') field in maps table - it's a > reserved keyword in MySQL and

[web2py] Re: register form and service conditions acceptance

2012-08-07 Thread Marco Prosperi
> > > Maybe show what you tried. I would think you could make either the field > label or comment (the comment appears after the input field) a link, and > trigger the modal dialog with an onclick attribute or a jQuery event > handler. > > Anthony > ok, in models/db.py I have put (but the link

Re: [web2py] Re: web2py hangs while creating the mysql tables

2012-08-07 Thread Yarin
Change the name of in your Field('long') field in maps table - it's a reserved keyword in MySQL and will cause it to hang. On Tuesday, August 7, 2012 10:57:07 AM UTC-4, Aurelijus Useckas wrote: > > Here it is: > > db.define_table('tag', > Field('tag', notnull=True, unique=True), > format=

Re: [web2py] Re: web2py hangs while creating the mysql tables

2012-08-07 Thread Aurelijus Useckas
Here it is: db.define_table('tag', Field('tag', notnull=True, unique=True), format='%(tag)s') db.define_table('city', Field('name', notnull=True, unique=True), format='%(name)s') db.define_table('maps', Field('name'), Field('last_name'), Field('long'), Field('

[web2py] free search API | Zero-click Info API duckduckgo.com

2012-08-07 Thread Michele Comitini
A free search API. I like this duckduckgo engine. api.duckduckgo.com https://github.com/crazedpsyc/python-duckduckgo/ mic --

Re: [web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Massimo Di Pierro
Looks like the css is missing... On Tuesday, 7 August 2012 07:56:57 UTC-5, Johann Spies wrote: > > On 7 August 2012 06:48, lyn2py wrote: > >> Question on the autocomplete widget: >> >> Previous post / discussions indicate that this widget doesn't work for >> IE, may I know if it has been fixed?

Re: [web2py] web2py 2.0 almost done

2012-08-07 Thread Massimo Di Pierro
which browser? On Tuesday, 7 August 2012 02:49:42 UTC-5, Johann Spies wrote: > > On 7 August 2012 06:33, Massimo Di Pierro wrote: > >> Web2py 2.0 is almost done. >> Please try the nightly build. >> Let us know if it breaks anything. >> > > Not serious problem but the import/export form in welcome

Re: [web2py] Re: web2py hangs while creating the mysql tables

2012-08-07 Thread Massimo Di Pierro
Can you please post the entire mode? My guess is an issue with capitalization perhaps combined with corruption of table files. On Tuesday, 7 August 2012 06:00:06 UTC-5, Aurelijus Useckas wrote: > > I've tried nearly any possible syntax, but with no success. Any line with > the reference to other

[web2py] Re: invalid select attribute: distinct

2012-08-07 Thread Massimo Di Pierro
This helps. I think I just fixed it in trunk. Can you check and confirm if it is fixed? On Tuesday, 7 August 2012 04:35:33 UTC-5, Elton Pereira de Lima wrote: > > Same error. > > One detail I forgot to mention, this only happens when I use mongodb. > > Follows the traceback: > > Traceback (most r

Re: [web2py] URL strategy for single application

2012-08-07 Thread Jonathan Lundell
On 7 Aug 2012, at 7:17 AM, Daniel Gonzalez wrote: > Thanks Jonathan, Bruno, > > I am a bit confused: where is this routes.py file? Is it a web2py-wide file, > or an application-specific file? It goes in the web2py root directory. There's a pair of example files for the two different router sty

Re: [web2py] URL strategy for single application

2012-08-07 Thread Daniel Gonzalez
Thanks Jonathan, Bruno, I am a bit confused: where is this routes.py file? Is it a web2py-wide file, or an application-specific file? Thanks, Daniel On Thursday, August 2, 2012 9:47:24 PM UTC+2, Jonathan Lundell wrote: > > On 2 Aug 2012, at 12:34 PM, Bruno Rocha wrote: > > routes.py > >

[web2py] How to use formkey with forms defined in the view?

2012-08-07 Thread Yarin
Sometimes I need to define my forms in the view, but still want to use as much of web2py's form functionality as possible. In those cases I generally define the form in the controller as well, with corresponding fields, and then build a form in the view with the same formname. This works, excep

Re: [web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Alec Taylor
Nah, I'm pretty sure jQuery UI is a little too heavy for our needs. Maybe just the bootstrap autocomplete plugin? On Tue, Aug 7, 2012 at 11:40 PM, Anthony wrote: > Maybe we should consider adopting jQuery UI autocomplete for the client-side > code. > > Anthony > > > On Tuesday, August 7, 2012 8:

[web2py] Re: smartgrid divided in columns

2012-08-07 Thread Martin Weissenboeck
Sorry - it seems that the picture of my table has been lost. I try with with an attached file. 2012/8/7 Martin Weissenboeck > Additional question: > is it possible to use radio buttons instead of checkboxes in a smart grid? > > > 2012/8/7 Martin Weissenboeck > >> >> Hi, >> I have a table with a

Re: [web2py] Re: Appengine CPU cycles

2012-08-07 Thread Alexei Vinidiktov
The app I'm developing is highly dependent on auth. Does it mean that any request that uses auth won't be faster than 200ms on GAE? On Tue, Aug 7, 2012 at 7:30 AM, howesc wrote: > are you using auth? auth takes around 200ms to load i think on GAE. i > avoid initializing auth except for the co

[web2py] Re: IS_NOT_IN_DB on three fields

2012-08-07 Thread Anthony
Looks like it should work. What do you mean it doesn't work? What are you expecting, and what is happening instead? Anthony On Tuesday, August 7, 2012 3:13:36 AM UTC-4, Annet wrote: > > I have the following validator: > > IS_NOT_IN_DB(db(db.PromoUnit.sequenceNumber==request.vars.sequenceNumber),

[web2py] Re: smartgrid divided in columns

2012-08-07 Thread Martin Weissenboeck
Additional question: is it possible to use radio buttons instead of checkboxes in a smart grid? 2012/8/7 Martin Weissenboeck > > Hi, > I have a table with a lot of checkboxes and only very short textstrings, > like this: > > > > > This table is created with my own function, but I would prefer to

Re: [web2py] Re: web2py 2.0 almost done

2012-08-07 Thread Anthony
Maybe we should consider adopting jQuery UI autocomplete for the client-side code. Anthony On Tuesday, August 7, 2012 8:56:57 AM UTC-4, Johann Spies wrote: > > On 7 August 2012 06:48, lyn2py wrote: > >> Question on the autocomplete widget: >> >> Previous post / discussions indicate that this wi

[web2py] smartgrid divided in columns

2012-08-07 Thread Martin Weissenboeck
Hi, I have a table with a lot of checkboxes and only very short textstrings, like this: This table is created with my own function, but I would prefer to create it with smartgrid. Is there any way to do this? Regards, Martin --

Re: [web2py] MySQL Error

2012-08-07 Thread Marin Pranjić
Hi, order is sql keyword too. This might be helpful to you: http://web2py.com/books/default/chapter/29/6?search=check#Reserved-keywords Regards, Marin On Tue, Aug 7, 2012 at 3:05 PM, Hassan Alnatour wrote: > Dear Marin, > > I change Like To Likes but i still get errors , the traceback is : >

  1   2   >