[web2py] PostgreSQL super slowdowns

2010-10-29 Thread Chris
Hey, I've noticed some serious slowdowns ever since I switched from SQLite to Postgres. Pages will take MINUTES to load - it's kind of fascinating. I don't have the full explanation for what's going on yet but I do have some clues. I've noticed it happens locally, and in a specific way: 1) I

[web2py] Re: Some beginner questions on form

2010-10-29 Thread David Marko
Yes, you can use dictionary to define values e.g. Field( 'name',requires=IS_IN_SET({'key1':'label1','key2':'label2','key3':'label3'}) ) David On 29 říj, 02:30, pierreth pierre.thibau...@gmail.com wrote: On 27 oct, 23:10, mdipierro mdipie...@cs.depaul.edu wrote:

[web2py] Making reference fields optional

2010-10-29 Thread Ruiwen Chua
Hi, Just wondering if it's possible to have fields that optionally reference other fields? For example, I have the below table defined: # Message model db.define_table('message', Field('sender', custom_auth_table, writable=False, required=True, notnull=True), Field('recipient',

[web2py] Is CRON working if web2py is running as a windows service?

2010-10-29 Thread Sverre
Is CRON working if web2py is running as a windows service?

[web2py] autocomplete widget and queries

2010-10-29 Thread Johann Spies
Is it possible to use the autocomplete widget with the values dependent of what has been entered in another field. eg. db.define_table('example', --  May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord!  His divine power has given us everything we

[web2py] Re: autocomplete widget and queries

2010-10-29 Thread Johann Spies
Apologies, I pressed some key that sent the email before it was finished: Using the model db.define_table('example', Field(' surname'), Field('name')) as the autocomplete widget's reference table containing the following data surname

[web2py] default=False on boolean Field

2010-10-29 Thread Ruiwen Chua
Hi, I'm running into a little problem with boolean Field in my model. I have: db.define_table('message', Field('sender', custom_auth_table, writable=False, required=True, notnull=True), Field('text', 'string', length=2048, required=True, notnull=True), Field('is_read',

Re: [web2py] default=False on boolean Field

2010-10-29 Thread Vinicius Assef
How about stripping the notnull=True? If I'm right, your default=False option will replace null value by False. On Fri, Oct 29, 2010 at 8:11 AM, Ruiwen Chua rwc...@gmail.com wrote: Hi, I'm running into a little problem with boolean Field in my model. I have: db.define_table('message',    

[web2py] Re: default=False on boolean Field

2010-10-29 Thread Ruiwen Chua
Right, that seems to work, thanks! I'm a little puzzled as to why these two options should conflict in this case though? Doesn't the notnull=True option simply prevent the field from holding a NULL value, while the default= option does in fact provide a value by default (hence avoiding a NULL)?

Re: [web2py] PostgreSQL super slowdowns

2010-10-29 Thread Johann Spies
On 29 October 2010 08:53, Chris partyonais...@gmail.com wrote: Hey, I've noticed some serious slowdowns ever since I switched from SQLite to Postgres. Pages will take MINUTES to load - it's kind of fascinating. I have been using both SQLITE and Postgresql (sometimes with the same content)

[web2py] Re: web2py sandbox

2010-10-29 Thread mdipierro
1: Is it possible on GAE? (if not, no problem I can host) I would not know how to maintain state since you cannot cache in ram. You an serialize the state but not functions and classes definitions. 2: Is it safe? how to make it safe? Yes except that you have total access to datastore. 3:

[web2py] Re: Quiet here tonight

2010-10-29 Thread mdipierro
Thanks. It seems lots of people are interested in web2py here in Argentina. On Oct 29, 12:34 am, ron_m ron.mco...@gmail.com wrote: Massimo, your users of web2py wish you a safe and successful trip spreading the good word about web2py.

[web2py] Re: Making reference fields optional

2010-10-29 Thread mdipierro
What database? On Oct 29, 3:05 am, Ruiwen Chua rwc...@gmail.com wrote: Hi, Just wondering if it's possible to have fields that optionally reference other fields? For example, I have the below table defined: # Message model db.define_table('message',         Field('sender',

[web2py] Re: Is CRON working if web2py is running as a windows service?

2010-10-29 Thread mdipierro
It should. On Oct 29, 3:59 am, Sverre sverreodeg...@gmail.com wrote: Is CRON working if web2py is running as a windows service?

[web2py] Re: default=False on boolean Field

2010-10-29 Thread mdipierro
You are right. That is a bug. I will fix it. On Oct 29, 6:01 am, Ruiwen Chua rwc...@gmail.com wrote: Right, that seems to work, thanks! I'm a little puzzled as to why these two options should conflict in this case though? Doesn't the notnull=True option simply prevent the field from holding

Re: [web2py] Looking for a developer - Web2py and Google App engine simple project

2010-10-29 Thread dipti seni
* www.ksrista.com search your life partner*

Re: [web2py] Re: Some beginner questions on form

2010-10-29 Thread dipti seni
* www.ksrista.com search your life partner*

Re: [web2py] Quiet here tonight

2010-10-29 Thread dipti seni
* www.ksrista.com search your life partner*

[web2py] Add Future Expires Headers.

2010-10-29 Thread annet
To improve the performance of my site someone advised me to Add Future Expires Headers. The instruction to do so reads like: This goes in your root .htaccess file but if you have access to httpd.conf that is better. This code uses the FilesMatch directive and the Header directive to add Future

[web2py] .represent and jqgrid

2010-10-29 Thread Johann Spies
The following works: db.teacher.id.represent = lambda id: A('edit',_href=URL(r=request,c='default',f='edit_teacher',args=str(id))) and the following not: db.school.id.represent = lambda id: db.school(id).name db.school.id is shown in jqgrid. How do I get the School name to show up in jqgrid?

[web2py] Record Versioning findings

2010-10-29 Thread baloan
First of all, CRUD is the hell of a productivity tool. Some findings: 1. Definiton of the archive table like given in the book: db.define_table('mytable_arcvhive', Field('current_record',db.mytable), db.mytable) breaks deletion of records in db.mytable. The foreign key constraint in

[web2py] update_record() failing on user record

2010-10-29 Thread Carl
When I try and do an update_record() I get an exception. Is there something wrong with my table definition? Can anyone help? From db.py: auth.settings.table_user = db.define_table( auth.settings.table_user_name, db.Field('email', 'string', length=254, unique=True, notnull=True,

Re: [web2py] Re: web2py sandbox

2010-10-29 Thread Bruno Rocha
May we could maintain state on GAE Database, I did an example running on my host, but I dont know how to protect the access for some dangerous modules as glob, sys, os, etc.. The right way to do it is to using a Java Script or Flash Python/API interpreter. 2010/10/29 mdipierro

[web2py] Reference to the mapping table - No drop down in admin interface

2010-10-29 Thread Steve
Hi, I have the following table structure in my db.py. db.define_table('table_a', Field('x_id', db.table_x), Field('name', length=200, required=True), Field('description', length=300), Field('displayorder', 'integer', required=True), format='%(name)s')

Re: [web2py] Re: Remove link in MENU for current url

2010-10-29 Thread Michael Wolfe
Massimo, I tried sending this patch directly to you, but I'm not sure if you received it. In any case, I re-exported the patch this morning so it runs against trunk. Let me know if I've missed something or if you've decided to hold this out of the framework. I won't be offended either way.

[web2py] Re: jQuery Tools

2010-10-29 Thread RipRyness
Note to self, reply posts don't show up immediately :) On Oct 28, 3:59 pm, RipRyness ripryn...@gmail.com wrote: I've been using jQuery UI but these look very cool. Thanks for the link. -Rip PS I must have hit reply to author on my previous try at responding to this post. On Oct 28, 1:23 

[web2py] Re: Some beginner questions on form

2010-10-29 Thread pierreth
On 29 oct, 03:22, David Marko dma...@tiscali.cz wrote: Yes, you can use dictionary to define values e.g. Field( 'name',requires=IS_IN_SET({'key1':'label1','key2':'label2','key3':'label3'}) ) David I'm beginning to really like web2py I think!

[web2py] Re: update_record() failing on user record

2010-10-29 Thread villas
This doesn't look very well formed: users[0].update_record({'registration_key''}) See the manual example... rows=db(db.person.id2).select() row=rows[0] row.update_record(name='Curt') http://www.web2py.com/book/default/chapter/06?search=update_record -D On Oct 29, 3:32 pm, Carl

Re: [web2py] Re: update_record() failing on user record

2010-10-29 Thread Carl
thank you for responding. my error is editing the code in the posting (which I tell myself I should never do!) I actually have: users[0].update_record({'registration_key'' : ''}) but even that is crazy talk and you are right, the following is correct... users[0].update_record(registration_key='')

[web2py] Re: Some beginner questions on form

2010-10-29 Thread villas
requires=IS_IN_SET({'key1':'label1','key2':'label2','key3':'label3'}) @David - thanks for reminding us of this. Book editors please note... The fact that IS_IN_SET can accept a dict should be in the Book? (Please forgive me if I missed it there!). -D

[web2py] web2py 1.88.1 is OUT

2010-10-29 Thread mdipierro
Give it a try... Changelog ## 1.88.1 - better list: string support, thanks Bob - jquery 1.4.3 - scripts/autoroutes.py - new admin wizard - added retrieve_username to navbar (if username) - internal rewrite for arbitrary paths (abspath), thanks Jonathan - populate support for list: and decimal,

[web2py] web2py 1.88.1 is OUT

2010-10-29 Thread mdipierro
Give it a try... Changelog ## 1.88.1 - better list: string support, thanks Bob - jquery 1.4.3 - scripts/autoroutes.py - new admin wizard - added retrieve_username to navbar (if username) - internal rewrite for arbitrary paths (abspath), thanks Jonathan - populate support for list: and decimal,

[web2py] Loading component with vars

2010-10-29 Thread Luther Goh Lu Feng
In one of my views, I loaded a component using: {{=LOAD('comment', 'conversation_dropdown.load', vars={'dashboard':True}, ajax=False)}} In the action: def conversation_download(): return{'test':request.vars.dashboard} In conversation_dropdown.load, {{=test}} evaluates to none. Have I

[web2py] Re: Loading component with vars

2010-10-29 Thread mdipierro
I am not sure this works unless you do it with ajax=True. I need to check. On Oct 29, 1:50 pm, Luther Goh Lu Feng elf...@yahoo.com wrote: In one of my views, I loaded a component using: {{=LOAD('comment', 'conversation_dropdown.load', vars={'dashboard':True}, ajax=False)}} In the action:

[web2py] Re: Loading component with vars

2010-10-29 Thread Luther Goh Lu Feng
Thank you. I have set ajax = True and the line works now. What is the reason for this requirement? On Oct 30, 2:52 am, mdipierro mdipie...@cs.depaul.edu wrote: I am not sure this works unless you do it with ajax=True. I need to check. On Oct 29, 1:50 pm, Luther Goh Lu Feng elf...@yahoo.com

[web2py] Re: Some beginner questions on form

2010-10-29 Thread mdipierro
It can also take a list of tuples. It will work like a dict of (key,value) but preserves sorting. On Oct 29, 11:32 am, villas villa...@gmail.com wrote: requires=IS_IN_SET({'key1':'label1','key2':'label2','key3':'label3'}) @David - thanks for reminding us of this. Book editors please note...

Re: [web2py] web2py 1.88.1 is OUT

2010-10-29 Thread Martín Mulone
Massimo, seems there are a problem with list: string, and using contains. Iam going to make an example. Or do you change anything about using contains in list string?. Because sentence like db(db.posts.keywords.contains('tag')).select() is returning nothing 2010/10/29 mdipierro

Re: [web2py] web2py 1.88.1 is OUT

2010-10-29 Thread Martín Mulone
I mail you the app. this is the app *in db.py* db.define_table('posts', Field('id', 'id'), Field('title', 'string', length=255), Field('keywords', 'list:string'), migrate=True) posts = db(db.posts.id0).select() if not posts: nid=db.posts.insert(title=The

[web2py] Re: Reference to the mapping table - No drop down in admin interface

2010-10-29 Thread Steve
Hi all, I am able to solve the issue. I just removed the following line. db.table_c.a_b_id.requires = IS_NOT_IN_DB(db, db.a_b) Now, I am getting the drop down. But the drop down shows the id of 'a_b' table. But ideally I would like the combination of a.name and b.name in the drop down for

[web2py] Re: Record Versioning findings

2010-10-29 Thread cjrh
On Oct 29, 4:09 pm, baloan balo...@googlemail.com wrote: 3. In the documentation the archive table is defined like db.define_table('mytable_history',    Field('current_record',db.mytable),    db.mytable) while in the current version it is defined like db.define_table('mytable_arcvhive',  

[web2py] Re: web2py 1.88.1 is OUT

2010-10-29 Thread mdipierro
Fixed. 1.88.2 but please check it On Oct 29, 3:47 pm, Martín Mulone mulone.mar...@gmail.com wrote: I mail you the app. this is the app *in db.py* db.define_table('posts',  Field('id', 'id'),  Field('title', 'string', length=255),  Field('keywords', 'list:string'),  migrate=True)

Re: [web2py] Re: web2py 1.88.1 is OUT

2010-10-29 Thread Branko Vukelic
On Sat, Oct 30, 2010 at 12:05 AM, mdipierro mdipie...@cs.depaul.edu wrote: Fixed. 1.88.2 but please check it Woah! Two releases in a few hours! :D -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio:

Re: [web2py] Re: web2py 1.88.1 is OUT

2010-10-29 Thread Bruno Rocha
I have a question: From Trunk it is going directly to Stable, or is passing throught Nighly Built for testing before going Stable? What is the roadmap/timeline for release cycle? 2010/10/29 Branko Vukelic bg.bra...@gmail.com On Sat, Oct 30, 2010 at 12:05 AM, mdipierro

[web2py] Re: web2py 1.88.1 is OUT

2010-10-29 Thread mdipierro
Normally it goes to the nightly build, perhaps not exactly the latest but something very close. The bug in question has been there for about one week. The problem is that nobody tests the nightly build. Massimo On Oct 29, 5:32 pm, Bruno Rocha rochacbr...@gmail.com wrote: I have a question:

[web2py] Re: Record Versioning findings

2010-10-29 Thread mdipierro
fixed in 1.88.2 On Oct 29, 4:45 pm, cjrh caleb.hatti...@gmail.com wrote: On Oct 29, 4:09 pm, baloan balo...@googlemail.com wrote: 3. In the documentation the archive table is defined like db.define_table('mytable_history',    Field('current_record',db.mytable),    db.mytable) while

[web2py] Re: Reference to the mapping table - No drop down in admin interface

2010-10-29 Thread mdipierro
format can be a function that takes the record returns a string. On Oct 29, 4:05 pm, Steve stephenga...@gmail.com wrote: Hi all, I am able to solve the issue. I just removed the following line. db.table_c.a_b_id.requires = IS_NOT_IN_DB(db, db.a_b) Now, I am getting the drop down. But the

[web2py] Re: Loading component with vars

2010-10-29 Thread mdipierro
Without ajax the component is loaded without the current request and therefore there are two request objects. I guess web2py got confused. It is a bug and I will fix it but I have not yet tested that is the case. Massimo On Oct 29, 1:56 pm, Luther Goh Lu Feng elf...@yahoo.com wrote: Thank you.

[web2py] Re: Some beginner questions on form

2010-10-29 Thread villas
Tuples. Even better, I didn't realise that advantage regarding sorting. Also in the book, please? :) On Oct 29, 7:57 pm, mdipierro mdipie...@cs.depaul.edu wrote: It can also take a list of tuples. It will work like a dict of (key,value) but preserves sorting. On Oct 29, 11:32 am, villas

[web2py] Re: Some beginner questions on form

2010-10-29 Thread pierreth
On 29 oct, 19:48, villas villa...@gmail.com wrote: Tuples.  Even better,  I didn't realise that advantage regarding sorting. Also in the book, please?  :) Now yet in the book. A wonder that should be there!

[web2py] Re: Some beginner questions on form

2010-10-29 Thread pierreth
On 29 oct, 19:48, villas villa...@gmail.com wrote: Tuples.  Even better,  I didn't realise that advantage regarding sorting. Also in the book, please?  :) Now yet in the book. A wonder that should be there!

[web2py] web2py automatic installation on KingHost(Brazil) control panel.

2010-10-29 Thread Bruno Rocha
Brazilian KingHost server now has web2py as an option for automatic installation on your control panel. According to information from the administrators of the host, many customers were starting to ask for the installation of web2py, and some later canceled the plan, citing difficulties in

Re: [web2py] Re: web2py 1.88.1 is OUT

2010-10-29 Thread Thadeus Burgess
Can we make some sort of massive web2py app that makes use of every single feature in web2py (as much as possible). If the index page of the app returns OK then everything is working. ??? Kind of like a unit test without a unit test. -- Thadeus On Fri, Oct 29, 2010 at 6:05 PM, mdipierro

[web2py] Re: PostgreSQL super slowdowns

2010-10-29 Thread Chris
I was just trying the home page...some selects are run on every page but as far as I know that's it. The machine's got plenty of memory and this is a very basic application with probably less than 1MB data total. On Oct 29, 7:59 am, Johann Spies johann.sp...@gmail.com wrote: On 29 October 2010