[web2py] apache Error

2012-01-04 Thread Web2Py Freak
Dear Guys, i am trying to deploy web2py using apache and mod_wsgi , i loaded mod_wsgi.so and i added this : NameVirtualHost *:443 DocumentRoot "C:/web2py/applications" ServerName server1 Order allow,deny Deny from all Order deny,allow Allow from all Ord

[web2py] Re: dropbox python api

2012-01-04 Thread Paul Gerrard
I just started looking at Dropbox yesterday. I've created some code that works in the python interpreter just fine, but when I paste to a web2py controller it fails. I suspect it's because the Dropbox module uses a variable calls 'session' that actually uses the Web2py session variable. Is there a

[web2py] Re: Custom registration action

2012-01-04 Thread Alan Etkin
I belive that this handlers are not supposed to return special data. You can define the function without the return statement On Jan 4, 3:59 am, Tsvi Mostovicz wrote: > Thanks. It simplifies a lot  of my current flow. > By the way, how am I supposed to finish the function? Just a return > stateme

[web2py] Re: Deployment problem on dotcloud with PostgreSQL

2012-01-04 Thread Thomas Dall'Agnese
Hi Jérôme, Thanks for your advice. Is it possible to change the name 'user' used by web2py without changing the code in the 'gluon' folder?

Re: [web2py] apache Error

2012-01-04 Thread Kenneth Lundström
Please check Apaches logs why starting Apache has failed. Kenneth Dear Guys, i am trying to deploy web2py using apache and mod_wsgi , i loaded mod_wsgi.so and i added this : NameVirtualHost *:443 DocumentRoot "C:/web2py/applications" ServerName server1 Order allow,deny

[web2py] auth_user approval pending

2012-01-04 Thread OpenMercury
Hi, I'm using the basic scaffolding app and have set it up so new users need to be approved to use the application. I'm registered and there is an entry in auth_user table. The registration key field value is 'Pending'. From reading the docs, all I should have to do is blank out the registration

[web2py] Re: Deployment problem on dotcloud with PostgreSQL

2012-01-04 Thread Massimo Di Pierro
web2py does not use "user". Some old apps may in models. On Jan 4, 6:37 am, Thomas Dall'Agnese wrote: > Hi Jérôme, > > Thanks for your advice. > Is it possible to change the name 'user'  used by web2py without changing > the code in the 'gluon' folder?

[web2py] Re: auth_user approval pending

2012-01-04 Thread Anthony
I cannot reproduce this problem. Do you get the "value already in database or empty" message specifically on the registration_key field, or on the email or username field? Have you set any validators for db.auth_user.registration_key (you can check by printing db.auth_user.registration_key.requ

[web2py] global functions in models

2012-01-04 Thread tsvim
Hi all, I'm trying to use the callbacks for auth.settings.register_onvalidation. I first put the function in controllers, when I discovered it should be in models as the settings are there. Now I have them in models, but I get a invalid syntax error on the last line: def register_new_table_toke

[web2py] Cookbook online ?

2012-01-04 Thread Omi Chiba
Great work !! Will it be available online somewhere ? http://www.packtpub.com/web2py-application-development-recipes-to-master-python-web-framework-cookbook/book

[web2py] Re: utf-8 and pyfpdf

2012-01-04 Thread Christopher Steel
French and English pdf examples (and some others if you dig a bit) http://code.google.com/p/uc-pdf/downloads/list

[web2py] Re: auth_user approval pending

2012-01-04 Thread OpenMercury
I get it on any field. As soon as I hit submit, I get that error and no updating takes place. Here is my model db.py: from gluon.tools import Auth, Crud, Service, PluginManager, prettydate auth = Auth(db, hmac_key=Auth.get_or_create_key()) crud, service, plugins = Crud(db), Service(), PluginManag

[web2py] Re: auth_user approval pending

2012-01-04 Thread Anthony
When an error occurs with a form submission, the form should be re-displayed with an error message attached to the field that caused the error. Where is the error being displayed? I notice you have db.auth_user.registration_id.requires = IS_NOT_IN_DB(...). If the registration_id field is left

[web2py] Re: auth_user approval pending

2012-01-04 Thread OpenMercury
It's on the Registration Id field. This field is blank. I removed all requires. Good news is that I can now update the record. Bad news is that I still can't log into the application. I'm now getting 'Invalid Login' when I try to login after verifying the registration. Grr.. On Jan 4, 11:29 am

[web2py] Re: auth_user approval pending

2012-01-04 Thread Anthony
> > Bad news is that I still can't log into the application. > I'm now getting 'Invalid Login' when I try to login after verifying > the registration. Grr.. > This line: auth = Auth(db, hmac_key=Auth.get_or_create_key()) reads the auth hmac_key from the "auth.key" file in the /private folder

[web2py] Re: dropbox python api

2012-01-04 Thread Joseph Jude
Paul, What kind of error are you getting? I'm also starting to play with dropbox. Got two functions in default controller (one is a callback function) but it works. BTW, I'm storing the dropbox session as current.session.dsession Joseph http://www.jjude.biz

[web2py] Re: auth_user approval pending

2012-01-04 Thread OpenMercury
I just created a new app using the app wizard. There is the auth.key file in the private folder. I then registered, had to remove the requires for the registration id field in the models/db.py file. I was able to modify the record for myself and remove the 'pending' for registration_key field.

[web2py] Re: auth_user approval pending

2012-01-04 Thread OpenMercury
I just created a basic application (Not using wizard), it appears that the aforementioned functions are working. I was just able to register, and cleared the pending registration key and logged in. So it seems this might all be pointing to the wizard. Not sure where/why. I'm migrating settings f

[web2py] Re: auth_user approval pending

2012-01-04 Thread Anthony
I just created a fresh app with the wizard and set registration_requires_approval=True (and removed the registration_id validator), and I had no problem registering, removing the "pending", and then logging in, so I'm not sure why you were having a problem (are you sure you entered the correct

[web2py] Re: auth_user approval pending

2012-01-04 Thread OpenMercury
I'll try that. On Jan 4, 12:46 pm, Anthony wrote: > I just created a fresh app with the wizard and set > registration_requires_approval=True (and removed the registration_id > validator), and I had no problem registering, removing the "pending", and > then logging in, so I'm not sure why you were

[web2py] Problem installing plugin_wiki inside tip

2012-01-04 Thread Günter Kolousek
After installing plugin_wiki inside a newly created application of a fresh clone of web2py, I get the following exception just by activating the newly created application: Traceback (most recent call last): File "/tmp/web2py/gluon/restricted.py", line 204, in restricted exec ccode in enviro

[web2py] Re: global functions in models

2012-01-04 Thread Ross Peoples
Are you having trouble with the line: auth.user.my_budgets.append(session.table_token) Or with return? I only ask because the above line assumes that the current user object has a list by the name of my_budgets. Is this list created somewhere else in the code? Also, because the user may not act

[web2py] Re: gluon.storage.Storage - No more KeyError breaks backward compatibility

2012-01-04 Thread Yarin
Thanks guys, but for the record I know missing keys on request.vars wasn't returning None in 1.99.2, and when I upgraded it broke my code. Does anyone have an explanation? On Jan 3, 1:48 pm, Ross Peoples wrote: > Bruno is correct, and that's the whole point of Storage is that you don't > have to

[web2py] Re: global functions in models

2012-01-04 Thread Alan Etkin
If you are doing post-registration process, you might want to use auth.settings.register_onaccept: register_onaccept is a list of functions or a single function or lambda that receive a form argument form.vars.id contains the id of the new auth_user record. For appending to a sequence stored in

[web2py] Re: gluon.storage.Storage - No more KeyError breaks backward compatibility

2012-01-04 Thread Anthony
On Wednesday, January 4, 2012 4:15:51 PM UTC-5, Yarin wrote: > > Thanks guys, but for the record I know missing keys on request.vars > wasn't returning None in 1.99.2, and when I upgraded it broke my code. > Does anyone have an explanation? > >From Jonathan: https://groups.google.com/forum/#!ms

[web2py] Re: global functions in models

2012-01-04 Thread Alan Etkin
And if the auth_user field is of type list:, seems that even it is ok to do simply: auth.user.mylistfield.append(object) without explicit db query or update On 4 ene, 18:42, Alan Etkin wrote: > If you are doing post-registration process, you might want to use > auth.settings.register_onaccept:

[web2py] Re: apache Error

2012-01-04 Thread Omi Chiba
I was using Apache on windows 7. You can compare your setting with mine. http://ochiba77.blogspot.com/2011/10/how-to-setup-web2py-apache-wsgi.html On Jan 4, 2:43 am, Web2Py Freak wrote: > Dear Guys, > > i am trying to deploy web2py using apache and mod_wsgi , i loaded > mod_wsgi.so and i added

[web2py] Re: postgres "there is already a transaction in progress"

2012-01-04 Thread max
Hello Massimo, i do have the same problem, postgres server error log: Jan 4 23:39:01 server postgres[5285]: [3-1] 2012-01-04 23:39:01 CET dbname dbuser WARNING: there is already a transaction in progress Jan 4 23:39:01 server postgres[5286]: [3-1] 2012-01-04 23:39:01 CET dbname dbuser WARNING

[web2py] Selecting Latest Thread for a specific category

2012-01-04 Thread Andrew
In some forum code, I am trying to select the latest thread specific to a forum category. But I am unsure how to do this Any ideas are greatly appreciated This is the code I tried with {{last_posts = db(db.forum_post.category == db.category.id).select(db.forum_post.ALL, orderby=~db.forum_post.id

[web2py] Re: Selecting Latest Thread for a specific category

2012-01-04 Thread Anthony
What do you get with that query? Is this on GAE (on GAE, I don't think the id's are necessarily in order)? On Wednesday, January 4, 2012 6:20:36 PM UTC-5, Andrew wrote: > > In some forum code, I am trying to select the latest thread specific > to a forum category. But I am unsure how to do this

Re: [web2py] Re: Implementing tornado chat server with web2py

2012-01-04 Thread Khalil KHAMLICHI
looks like websockets dont work any more with the couple chrome/tornado => error : Unexpected response code: 426 attached image from dev. tools in chrome. <>

Re: [web2py] Re: Selecting Latest Thread for a specific category

2012-01-04 Thread Andrew Evans
Hi no its not on GAE I do get the last post but its for the last category posted in here is a link you can see :-) http://www.fireflywra.com/forum *cheers On Wed, Jan 4, 2012 at 5:10 PM, Anthony wrote: > What do you get with that query? Is this on GAE (on GAE, I don't think the > id's are ne

[web2py] Re: Problem installing plugin_wiki inside tip

2012-01-04 Thread Massimo Di Pierro
Please open a ticket. This is a bug. On Jan 4, 1:00 pm, Günter Kolousek wrote: > After installing plugin_wiki inside a newly created application > of a fresh clone of web2py, I get the following exception > just by activating the newly created application: > > Traceback (most recent call last): >

[web2py] Re: Cookbook online ?

2012-01-04 Thread Massimo Di Pierro
I believe they will sell it in PDF. They have copyright. I have no saying on the matter. On Jan 4, 9:50 am, Omi Chiba wrote: > Great work !! > Will it be available online somewhere ? > > http://www.packtpub.com/web2py-application-development-recipes-to-mas...

Re: [web2py] Re: Selecting Latest Thread for a specific category

2012-01-04 Thread Anthony
Do you have a particular category to select from? If so, you need to add that condition to your query. Assuming some_id is the id of the category you want: db((db.forum_post.category == db.category.id) & (db.category.id == some_id)).select(db.**forum_post.ALL, orderby=~db.forum_post.id , limitb

[web2py] Re: Field vs id

2012-01-04 Thread JF
It is not exactly identical, but changing the following line in my controller "item.py", function "edit": thispage = db.table[request.args(0)] with: thispage = db(db.table.fieldname==request.args(0)).select().first() provides me with the result I was waiting for for a URL like: http: