[web2py] OT working with semaphores

2011-01-12 Thread ron_m
Talk and free book by Prof Allen Downey on semaphores. http://www.greenteapress.com/semaphores/ Coding plus observation tool in Python. Goes into some good usage patterns.

Re: [web2py] Re: Error using setup-web2py-ubuntu.sh on Linode

2011-01-12 Thread Kenneth Lundström
To fix the "Could not realiably determine." you have to add a ServerName line to your Apaches httpd.conf file. Without that Apache does not know what name to use. Kenneth Any post in particular you're pointing to? I looked at several, and they didn't work. At the end of the install scr

[web2py] Re: Error using setup-web2py-ubuntu.sh on Linode

2011-01-12 Thread Chase Lee
Any post in particular you're pointing to? I looked at several, and they didn't work. At the end of the install script are these lines: /etc/init.d/apache2 restart cd /home/www-data/web2py sudo -u www-data python -c "from gluon.widget import console; console();" sudo -u www-data python -c "from g

Re: [web2py] plugin_powertables: is this expected behavior?

2011-01-12 Thread rochacbruno
Hi, I need to improve that, the fact is that details table runs in a different thread because it is called by ajax. So it have no access to the DAL instance used in main table's datasource. So in model It assign a new variable pointing to the instance of DAL in commom case it is db. But you c

[web2py] Re: good news...

2011-01-12 Thread Massimo Di Pierro
My son is 5. To him I would suggest the aquarium. :-) On Jan 12, 8:45 pm, Anthony wrote: > On Wednesday, January 12, 2011 10:50:25 AM UTC-5, Massimo Di Pierro wrote: > > > I hope some of you will be attending. It would be a shame if we do not > > get a full room. ;-) > > Planning to take the fami

Re: [web2py] Re: Error using setup-web2py-ubuntu.sh on Linode

2011-01-12 Thread Felixdm || Augusto Félix Dal Mas
On Thu, Jan 13, 2011 at 12:40 AM, Chase Lee wrote: > When I access the domain/admin over https, I get this message: admin > disabled because unable to access password file  =/ > > That'd be nice if I didn't have to worry about the error > > On Jan 12, 10:04 pm, pbreit wrote: >> There's a chan

[web2py] Re: Error using setup-web2py-ubuntu.sh on Linode

2011-01-12 Thread Chase Lee
When I access the domain/admin over https, I get this message: admin disabled because unable to access password file =/ That'd be nice if I didn't have to worry about the error On Jan 12, 10:04 pm, pbreit wrote: > There's a chance that this is just a warning that you don't necessarily need

[web2py] Re: Using mysqldb instead of pymysql

2011-01-12 Thread drayco
I need that some of you guys check this, in my case, Pymysql have some issues with legacy databases (First, I think this issue is of new dal, but I'm not sure) However mysqldb, my application work well this is my report: http://groups.google.com/group/web2py/browse_thread/thread/72e91e281e0610d8/

Re: [web2py] new router

2011-01-12 Thread pbreit
Could it be caught with a 404 and routed somewhere?

[web2py] Re: Error using setup-web2py-ubuntu.sh on Linode

2011-01-12 Thread pbreit
There's a chance that this is just a warning that you don't necessarily need to worry about. How are you accessing admin? Make sure you access it either with "https" or "localhost".

[web2py] plugin_powertables: is this expected behavior?

2011-01-12 Thread mart
I guess this is for Bruno, I wanted try your tables plugin, and it seemed to have create duplicate copies of each and every table if the database with itself as prefix. Example: db.p4NewUserRequest has been duplicated to plugin_powertablesdb.p4NewUserRequest And ALL tables are now like this.

Re: [web2py] new router

2011-01-12 Thread Wikus van de Merwe
As Jonathan mentioned, to do that with old routes you will need to hardcode a list of your controllers. Then anything what is not a controller is a username. But this is not the best way to do it. I like better the way the new router works, that is using predefined defaults. So what you could d

[web2py] Error using setup-web2py-ubuntu.sh on Linode

2011-01-12 Thread Chase Lee
Hi, When installing on Linode, I receive this message at the end of the install: * Restarting web server apache2 apache2: apr_sockaddr_info_get() failed for viasco apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Thu Jan 13 02:22:14

[web2py] Re: good news...

2011-01-12 Thread Anthony
On Wednesday, January 12, 2011 10:50:25 AM UTC-5, Massimo Di Pierro wrote: > > I hope some of you will be attending. It would be a shame if we do not > get a full room. ;-) Planning to take the family for a visit to Atlanta sometime around then (we used to live there) -- will do my best to o

Re: [web2py] new router

2011-01-12 Thread Jonathan Lundell
On Jan 12, 2011, at 4:56 PM, Bruno Rocha wrote: > I am trying to configure a different way of routing, may be you can help me > or point some hint about it, > It is a system where the user will register himself and get instant access to > an account (just like twitter), and the system will give a

[web2py] Re: How to rename a FORM submit button?

2011-01-12 Thread dederocks
Awsome, thank you! On 13 jan, 01:59, Bruno Rocha wrote: > FORM(INPUT(_type='submit',_value='Click here')) > > 2011/1/12 dederocks > > > If you have > > FORM(INPUT(_type='submit')) > > just to display a button, is it possible to change the button label > > value? > >

Re: [web2py] How to rename a FORM submit button?

2011-01-12 Thread Bruno Rocha
FORM(INPUT(_type='submit',_value='Click here')) 2011/1/12 dederocks > If you have > FORM(INPUT(_type='submit')) > just to display a button, is it possible to change the button label > value?

[web2py] How to rename a FORM submit button?

2011-01-12 Thread dederocks
If you have FORM(INPUT(_type='submit')) just to display a button, is it possible to change the button label value?

[web2py] new router

2011-01-12 Thread Jonathan Lundell
With one more patch pending, the new URL router is looking pretty stable. There are some features pending, but they'll have to wait. I thought I'd describe some of the possibilities with a few use cases. Suppose you've written an app, named it 'myapp', and want to make it the default, with its

[web2py] Re: experts

2011-01-12 Thread Massimo Di Pierro
I agree. We created a google group for members. You should have received an invite. This discussions should move there and be privately. If you did not get an invite I will make sure you get another email. Massimo On Jan 12, 4:27 pm, Alexandre Andrade wrote: > I think we have to emphasize the o

Re: [web2py] Re: experts

2011-01-12 Thread Alexandre Andrade
I think we have to emphasize the organizational aspect of experts4solutions. Otherwise, it will be just another portfolio website. I understand it is begining, but I think it will not be relevant without a organizational aspect. Things to think: 1. Who will receive demand, collect proposals and

[web2py] Re: list:reference update

2011-01-12 Thread dederocks
Great, thank you! On 12 jan, 23:03, Massimo Di Pierro wrote: > The update should be > > db(db.groupe.id==1).update(groupusers=[1,2]) > > or one of the following > > db.groupe[1].update_record(groupusers=[1,2]) > db.groupe(1).update_record(groupusers=[1,2]) > db.groupe(id=1).update_record(groupuse

[web2py] Re: if user is logged out

2011-01-12 Thread pk
one question: def user(): if request.args(0) == 'logout': db(query).delete() return dict(form=auth()) what is if i need there the auth.user.id??? this is my query: db(db.nao.userid==auth.user.id).update(db.nao.ipadress="") On 12 Jan., 22:55, pk wrote: > super thanks so much! :) >

[web2py] Re: Trunk hangs at startup

2011-01-12 Thread dederocks
It must be one of the updates done within the last six hours, I would say. On 12 jan, 23:00, Massimo Di Pierro wrote: > Any way you can tell which revision causes the problem? > > On Jan 12, 2:50 pm, dederocks wrote: > > > And restarting the computer didn't solve the issue! > > > On 12 jan, 21:4

[web2py] Re: list:reference update

2011-01-12 Thread Massimo Di Pierro
The update should be db(db.groupe.id==1).update(groupusers=[1,2]) or one of the following db.groupe[1].update_record(groupusers=[1,2]) db.groupe(1).update_record(groupusers=[1,2]) db.groupe(id=1).update_record(groupusers=[1,2]) db.groupe(db.groupe.id==1).update_record(groupusers=[1,2]) but NOT

[web2py] Re: Trunk hangs at startup

2011-01-12 Thread Massimo Di Pierro
Any way you can tell which revision causes the problem? On Jan 12, 2:50 pm, dederocks wrote: > And restarting the computer didn't solve the issue! > > On 12 jan, 21:40, dederocks wrote: > > > > > > > > > Stopping doesn't work either -- need to kill the app. > > > On 12 jan, 21:35, dederocks wro

[web2py] Re: Trunk hangs at startup

2011-01-12 Thread Massimo Di Pierro
Will look into this. On Jan 12, 2:50 pm, dederocks wrote: > And restarting the computer didn't solve the issue! > > On 12 jan, 21:40, dederocks wrote: > > > > > > > > > Stopping doesn't work either -- need to kill the app. > > > On 12 jan, 21:35, dederocks wrote: > > > > Running the latest trun

[web2py] Re: if user is logged out

2011-01-12 Thread pk
super thanks so much! :) On 12 Jan., 22:45, Bruno Rocha wrote: > Ops, Sorry, Copy & Paste mistake! > > forget my last mail. > > This the code > > def user(): >     if request.args(0) == 'logout': >         #do something here >         db(query).delete() >     return dict(form=auth()) > > -- > >

Re: [web2py] if user is logged out

2011-01-12 Thread Bruno Rocha
Ops, Sorry, Copy & Paste mistake! forget my last mail. This the code def user(): if request.args(0) == 'logout': #do something here db(query).delete() return dict(form=auth()) -- Bruno Rocha http://about.me/rochacbruno/bio

Re: [web2py] if user is logged out

2011-01-12 Thread Bruno Rocha
Do you mean this? # -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations # ## This is a samples controller ## - index is the default action of any application ## - user is requ

[web2py] Re: list:reference update

2011-01-12 Thread dederocks
Hi Kenneth, Thanks a lot for getting back. Actualy, to my understanding, the 'list:reference' provides a way to bypass the third table, and most importantly the joins that don't work on GAE. A list of records is represented as a string with the ids separated by '¦'. E.g. in my example, the groupus

Re: [web2py] list:reference update

2011-01-12 Thread Kenneth Lundström
I might be completly wrong but shouldn´t it be like this: db.define_table('person', Field('name'), Field('groupe', 'list:reference groupe')) db.define_table('groupe',Field('groupname')) db.groupe(db.person.id<3).update(groupe=1) If one users can be in many groups you get a many-to-many relation

[web2py] if user is logged out

2011-01-12 Thread pk
hi togehter, how can i edit my own commands (for example i will delete something in a db table) if user get logged out? where can i do this? thanks peter

[web2py] Re: Combining left outer join how to?

2011-01-12 Thread Uolter
Hi, I got the trick users=db().select(db.auth_user.ALL, db.auth_group.ALL, left=[db.auth_membership.on(db.auth_user.id == db.auth_membership.user_id), db.auth_group.on(db.auth_group.id == db.auth_membership.user_id) ] ) Indeed, this the query I need!! And it works fine. :-) On

[web2py] list:reference update

2011-01-12 Thread dederocks
I'm trying to update a 'list:reference' field programaticaly, but this doesn't work so far. Say I have this model: db.define_table('person', Field('name')) db.define_table('groupe',Field('groupname'), Field('groupusers', 'list:reference person')) assume I have already entered three persons, with

[web2py] Need Help Using CRUD with Self-Referencing Tables

2011-01-12 Thread SaltyCow
Hello there... I'm hoping that this is a common problem with a simple solution. I'm attempting to create an app that uses self-referencing tables, in one case to refer to employees and their managers (who themselves are also employees). I used the app wizard to generate the scaffolding. I am able

[web2py] Re: Trunk hangs at startup

2011-01-12 Thread dederocks
And restarting the computer didn't solve the issue! On 12 jan, 21:40, dederocks wrote: > Stopping doesn't work either -- need to kill the app. > > On 12 jan, 21:35, dederocks wrote: > > > Running the latest trunk on Win7, FF, web2py hangs after starting the > > server ('waiting for 127.0.0.1...'

[web2py] Re: Trunk hangs at startup

2011-01-12 Thread dederocks
Stopping doesn't work either -- need to kill the app. On 12 jan, 21:35, dederocks wrote: > Running the latest trunk on Win7, FF, web2py hangs after starting the > server ('waiting for 127.0.0.1...'), but appears to work otherwise: > e.g. if I specify the url of an application, it works. > Admin w

[web2py] Trunk hangs at startup

2011-01-12 Thread dederocks
Running the latest trunk on Win7, FF, web2py hangs after starting the server ('waiting for 127.0.0.1...'), but appears to work otherwise: e.g. if I specify the url of an application, it works. Admin works as well. Hope this helps.

Re: [web2py] Re: Using mysqldb instead of pymysql

2011-01-12 Thread Vasile Ermicioi
hi, Massimo, there is a new version of pymysql I think pymysql has a few advantages - being pure Python, PyMySQL is easily patched by gevent and the likes to make it cooperative http://code.google.com/p/pymysql/wiki/WhyPyMySQL I use it with web2py and works fine

[web2py] Re: What is queue.yaml

2011-01-12 Thread Massimo Di Pierro
Good idea. I added a comment. On Jan 12, 10:01 am, Luther Goh Lu Feng wrote: > On Jan 12, 11:58 pm, Jonathan Lundell wrote: > > > On Jan 12, 2011, at 1:29 AM, Luther Goh Lu Feng wrote: > > > > Looking at the source, I > > > seehttp://code.google.com/p/web2py/source/browse/queue.yaml > > > and w

[web2py] Re: experts

2011-01-12 Thread Michael McGinnis
But the home page also says, "...or contact us and we will assemble for you a well-balanced and cost-effective international team to work on your project." Should we use the http://experts4solutions.com/e4s/default/contact to start that process, or should the home page be changed to de- emphasize

[web2py] Re: What is queue.yaml

2011-01-12 Thread Luther Goh Lu Feng
On Jan 12, 11:58 pm, Jonathan Lundell wrote: > On Jan 12, 2011, at 1:29 AM, Luther Goh Lu Feng wrote: > > > > > Looking at the source, I > > seehttp://code.google.com/p/web2py/source/browse/queue.yaml > > and wonder what it is used for. Any ideas? > > http://code.google.com/appengine/docs/pytho

Re: [web2py] What is queue.yaml

2011-01-12 Thread Jonathan Lundell
On Jan 12, 2011, at 1:29 AM, Luther Goh Lu Feng wrote: > > Looking at the source, I see > http://code.google.com/p/web2py/source/browse/queue.yaml > and wonder what it is used for. Any ideas? http://code.google.com/appengine/docs/python/config/queue.html

[web2py] Storing the Original Filename in the official web2py book

2011-01-12 Thread carlo
def display_form(): record = db.person(request.args(0)) or redirect(URL('index')) url = URL('download') form = SQLFORM(db.person, record, deletable=True, upload=url, fields=['name', 'image']) if request.vars.image!=None: form.vars.image_filename = request.

[web2py] Re: Using mysqldb instead of pymysql

2011-01-12 Thread Massimo Di Pierro
It is more portable because it is pure python (mysqldb includes c libraries). About faster, I remember reading something about that but this everything I could find today: http://code.google.com/p/pymysql/wiki/Performance On Jan 12, 9:40 am, Luther Goh Lu Feng wrote: > Btw, is there a link

[web2py] Re: good news...

2011-01-12 Thread Massimo Di Pierro
I hope some of you will be attending. It would be a shame if we do not get a full room. ;-) Massimo On Jan 12, 9:26 am, Robert wrote: > Nice! 2011 the year of web2py! :)

[web2py] Re: Using mysqldb instead of pymysql

2011-01-12 Thread Luther Goh Lu Feng
Btw, is there a link I can read about pymysql being faster and more portable? On Jan 12, 10:47 pm, Massimo Di Pierro wrote: > that should do it. but why? pymysql is faster and more portable. > > On Jan 12, 8:38 am, Luther Goh Lu Feng wrote: > > > > > > > > > I upgraded a project from 1.87.3 to 1

[web2py] Re: good news...

2011-01-12 Thread Robert
Nice! 2011 the year of web2py! :)

[web2py] Re: Using mysqldb instead of pymysql

2011-01-12 Thread Luther Goh Lu Feng
Anyway these are some of the open pymysql issues http://code.google.com/p/pymysql/issues/list On Jan 12, 11:02 pm, Luther Goh Lu Feng wrote: > There are some concerns that pymysql might not be ready for production > yet. Nothing specific. But mysqldb is definitely stable and tested. > > On Jan 1

[web2py] Re: Using mysqldb instead of pymysql

2011-01-12 Thread Luther Goh Lu Feng
There are some concerns that pymysql might not be ready for production yet. Nothing specific. But mysqldb is definitely stable and tested. On Jan 12, 10:47 pm, Massimo Di Pierro wrote: > that should do it. but why? pymysql is faster and more portable. > > On Jan 12, 8:38 am, Luther Goh Lu Feng w

[web2py] Re: Using mysqldb instead of pymysql

2011-01-12 Thread Massimo Di Pierro
that should do it. but why? pymysql is faster and more portable. On Jan 12, 8:38 am, Luther Goh Lu Feng wrote: > I upgraded a project from 1.87.3 to 1.91.6. Pymysql is one of the new > features, replacing mysqldb. > > I would like to ask if it is possible to do an override and use > mysqldb inste

[web2py] Re: recursive select bug

2011-01-12 Thread Massimo Di Pierro
It works in the normal shell python web2py.py -S yourapp -M -n It does not work on the web based shell for the same reason here: http://groups.google.com/group/web2py/browse_thread/thread/f33577079802501e# On Jan 12, 8:36 am, dederocks wrote: > I've tried to run the following example, a copy-

[web2py] Using mysqldb instead of pymysql

2011-01-12 Thread Luther Goh Lu Feng
I upgraded a project from 1.87.3 to 1.91.6. Pymysql is one of the new features, replacing mysqldb. I would like to ask if it is possible to do an override and use mysqldb instead of pymysql. If this is not possible, would editing gluon/dal.py to revert the patch be a possible hack? http://code.goo

[web2py] recursive select bug

2011-01-12 Thread dederocks
I've tried to run the following example, a copy-paste from the book. What am I doing wrong? my model: db.define_table('person', Field('name')) db.define_table('dog', Field('name'), Field('owner',db.person)) in the shell: web2py Shell Version 1.91.6 (2011-01-10 20:54:45) In [1] : db.person.inser

[web2py] Re: upload widgets problem with nullable compound validators

2011-01-12 Thread Massimo Di Pierro
good catch. Let me think about this... On Jan 12, 1:12 am, kenji4569 wrote: > I applied the follwing validators for upload fields in version 1.91.6: > > requires = [ >     IS_NULL_OR(IS_UPLOAD_FILENAME(extension='pdf')), >     IS_NULL_OR(IS_LENGTH(1048576, 1024)), > ] > > Everything was fine unti

[web2py] upload widgets problem with nullable compound validators

2011-01-12 Thread kenji4569
I applied the follwing validators for upload fields in version 1.91.6: requires = [ IS_NULL_OR(IS_UPLOAD_FILENAME(extension='pdf')), IS_NULL_OR(IS_LENGTH(1048576, 1024)), ] Everything was fine until I used a SQLFORM object with an upload keyword for editing. Then, a delete checkbox of an

[web2py] Re: how to show multiple controller's views on the same page?

2011-01-12 Thread Mirek Zvolský
> I am wondering whether it is possible to show multiple controller's views... Inside the controller code you can change to other view: if something: response.view='xxx.html' In the view itself you can have more named parts. In such case the extended layout has not only one {{include}} comman

Re: [web2py] experts

2011-01-12 Thread Kenneth Lundström
Look at the list on www.experts4solutions.com), select an expert and contact directly. Kenneth To Massimo: what is the procedure to utilise the experts, please layout the procedure. I will have a task in shortly.Debebe

[web2py] experts

2011-01-12 Thread debebe asefa
To Massimo: what is the procedure to utilise the experts, please layout the procedure. I will have a task in shortly.Debebe

Re: [web2py] Email gateway

2011-01-12 Thread Alexandre Andrade
see http://web2py.com/book/default/chapter/06?search=upload+#Manual-Uploads 2011/1/10 Kenneth Lundström > Thank You Bruno and Alexandre for your answers. > > I think I have now downloaded the attachment but not written i

[web2py] Bugreport

2011-01-12 Thread Kenneth Lundström
I´m working on a new application which I created with the online wizard. I just created a new record and then updated it via those crud forms which are created for all tables. This tabel was created by hand by editing the database models file and then I copied those crud forms too. But when

Re: [web2py] Re: Apache, Wsgi problem

2011-01-12 Thread Kenneth Lundström
I can´t be sure which application it is. But Iĺl do some stresstests later today and report more. Kenneth could this be a timeout issue? Could it be the app causes a deadlock in the db? What app is this? On Jan 11, 10:58 am, Kenneth Lundström wrote: I'm getting the same Premature end of scr

[web2py] What is queue.yaml

2011-01-12 Thread Luther Goh Lu Feng
Looking at the source, I see http://code.google.com/p/web2py/source/browse/queue.yaml and wonder what it is used for. Any ideas?

[web2py] Re: web2py fabric, pip, virtualenv, virtualenvwrappers deployment scripts

2011-01-12 Thread mart
interesting. What I do for hard-to-please head bangers, like those .cfg files you mention, is I would collect what needs to be updated (an entire section if I have to), find the most efficient way to update/resolve that data, incorporate that in the bootstrap automation. So at install time, the aut

[web2py] Re: ajax upload for components

2011-01-12 Thread weheh
Thanks Michele & selecta for your contributions. I'm checking them both out. And Michele, I'm glad you kept pushing me towards jquery.Form. Thanks. On Jan 11, 7:37 am, Martín Mulone wrote: > Thanks, +1. For me I think this need to be default. > > 2011/1/11 selecta > > > > > and just for completi