[web2py] Auth class and login time

2010-02-15 Thread reyelts
Does the auth class squirrel away the login time (assuming auth.is_logged_in()==True? If so, how does one retrieve it? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe f

[web2py] IS_NULL_OR vs IS_IN_DB with brackets

2010-02-15 Thread reyelts
I have a field that I want validated in an SQLFORM, but I don't want a dropbox. The book directs us to use brackets as follows: If you want the field validated, but you do not want a dropbox, you must put the validator in a list. db.dog.owner.requires = [IS_IN_DB(db, 'person.id', ')] I als

[web2py] extend login method of Auth class

2010-02-15 Thread reyelts
I'd like to extend the login method of the Auth class to do a couple of initialization things based on the login. Based on what I've been reading, it looks like I *should* be able to do something like this: from gluon.tools import * class MyAuth(Auth): def login( self,

[web2py] Re: IS_NULL_OR vs IS_IN_DB with brackets

2010-02-16 Thread reyelts
villas, That was cut/paste from the web version of the book... formatting errors and all. Fortunately, the live code I'm working on doesn't have that particular error. mdpierro, THANKS for the redirect... putting the brackets on the outside did the trick. -- You received this message because you

[web2py] unmarshallable object problem

2010-02-16 Thread reyelts
First, I'm trying to create a data base entry using SQLFORM+insert(), and am getting this error: S'Traceback (most recent call last):\n File "gluon/main.py", line 504, in wsgibase\n File "gluon/globals.py", line 375, in _try_store_on_disk\n File "gluon/sql.py", line 705, in Row_pickler \nValueE

[web2py] Re: extend login method of Auth class

2010-02-16 Thread reyelts
Thanks... it's a beautiful thing. Sorry I didn't see that in the doc... I clearly wasn't searching on the right keywords. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscrib

[web2py] Re: extend login method of Auth class

2010-02-16 Thread reyelts
Hmm... I stumbled on a headscratcher that took a while to figure out. When I use the register function to create a new user, that user is automatically logged in. But, auth.settings.login_onaccept was never invoked. I would have expected one of the following: A) The auth.settings.login_onaccept fu

[web2py] Re: Auth class and login time

2010-02-16 Thread reyelts
Sweet. Are there any other interesting undocumented variables like this? Is there any reason they aren't mentioned in the documentation? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com

[web2py] Re: unmarshallable object problem

2010-02-16 Thread reyelts
I see, it was the following statement after the insert() that was the underlying cause: session.myrec = db(PIDB.PI_username==auth.user.username).select().first() I played around with different variations on this theme with no luck. Is there something inherently wrong with trying to store a dat

[web2py] Re: cancel button

2010-02-16 Thread reyelts
I'm trying to use this with my shiny new SQLFORM. But I'm clearly missing something. Here's a snippet: form = SQLFORM(...blah...) submit = form.element(_type='submit') submit.parent.append(INPUT(_type='submit',_value='Cancel',_name='button')) if request.vars.button == 'Cancel': s

[web2py] SyntaxError: not enough information to build the url

2010-02-19 Thread reyelts
I've got an application that seems to run fine in a standalone web2py environment but is having an issue with GAE. I just get "Internal Error" in the browser. The GAE log shows the subject SyntaxError: 2010-02-19 18:08:19 Running command: "['C:\\Python25\\pythonw.exe', 'C: \\Program Files\\Google\

[web2py] Re: SyntaxError: not enough information to build the url

2010-02-19 Thread reyelts
Thanks a bunch... it didn't occur to me to look in layout.html, and that's where the problem was. The other half of the problem was that it appears the GAE development environment doesn't seem to want to pick up changes dynamically like the standalone web2py environment... dev_appserver.py seems to

[web2py] Re: SyntaxError: not enough information to build the url

2010-02-20 Thread reyelts
Aha... I was unaware of that mechanism. I created a favicon.ico and see it shows up in places like the URL field in Firefox. Thanks! -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To

[web2py] read file in GAE?

2010-02-20 Thread reyelts
I'm trying to read a file from my static directory. I construct the name as follows: fname = request.folder + "static/" + pname + ".xml" logging.debug("profile " + fname) if os.path.exists(fname): # if we have a file # logging.debug(" file exists") else: loggin

[web2py] Re: read file in GAE?

2010-02-20 Thread reyelts
Massimo, You're correct that, though a better approach, switching to os.path.join() didn't have any effect. According to appcfg.py, my files are uploaded: 2010-02-20 12:20:39,608 INFO appcfg.py:1426 Processing file 'applications/canyonezt/static/COMP_profile.xml' And I confirmed that with wge

[web2py] Re: read file in GAE?

2010-02-20 Thread reyelts
Robin is correct... storing the files someplace other than 'static' works just fine. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web

[web2py] impersonate: decorators, original user info

2010-03-01 Thread reyelts
I implemented a small control/view to sit in front of the impersonate function that's implemented in web2py. Together, the two just present a list of users to impersonate and then redirect to activate the impersonation. controller: @auth.requires(auth.requires_login() and auth.has_permission('i

[web2py] Re: impersonate: decorators, original user info

2010-03-01 Thread reyelts
Sorry, "squirrel away" as in how a squirrel saves/hides food for later. Thanks, the impersonator information was exactly what I was after. I have a banner at the top of the page that shows the user information, and wanted to also show impersonator information in the case the user is being impersona

[web2py] Re: impersonate: decorators, original user info

2010-03-01 Thread reyelts
Thanks Massimo, I tried your change, but got an error: Traceback (most recent call last): File "gluon/restricted.py", line 173, in restricted File "w:/web2py_win/applications/canyonezt/controllers/ default.py", line 236, in File "gluon/globals.py", line 96, in File "w:\web2py_w

[web2py] Re: impersonate: decorators, original user info

2010-03-04 Thread reyelts
The new implementation works fine. Thx! -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more op

[web2py] Re: Rocket - windows binary issues

2010-03-15 Thread reyelts
How would this impact those of us who develop with the current Windows binary image and then test/deploy with GAE which requires Python 2.5? I hate developing directly with dev_appserver.py because it runs so much slower. -- You received this message because you are subscribed to the Google Group

[web2py] Re: Rocket - windows binary issues

2010-03-15 Thread reyelts
The second of those has already bitten me once. :( But then, I'm a relative Python newbie. It would be really nice it GAE provided for newer versions... but people have been begging for that for years. -- You received this message because you are subscribed to the Google Groups "web2py-users" gr

[web2py:37986] web2py newbie + google app engine

2009-12-28 Thread reyelts
/cpu time) INFO 2009-12-29 03:12:23,201 dev_appserver.py:3243] "GET / HTTP/ 1.1" 303 - INFO 2009-12-29 03:12:23,221 dev_appserver_index.py:205] Updating / home/reyelts/web2py/index.yaml ERROR2009-12-29 03:12:23,264 restricted.py:143] Traceback (most recent call last): File &q

[web2py:38100] Re: web2py newbie + google app engine

2009-12-30 Thread reyelts
Thanks Massimo! That was exactly the problem. I had basic GAE working with Python 2.6, so made the rash assumption that the rest of it would run safely. I swapped in Python 2.5 and it GAE+web2py runs *much* better. It serves out pages as expected, etc. It does come up with a couple of warnings: WA

[web2py] 1.91.4 error reading version file

2010-12-25 Thread reyelts
I just upgraded to 1.91.4. Running the source version on Linux, I get this in web2py.log when attempting startup: Traceback (most recent call last): File "web2py.py", line 16, in import gluon.widget File "/media/EZTRAIN/web2py_lin/gluon/widget.py", line 24, in import main File "/me

[web2py] Re: 1.91.4 error reading version file

2010-12-27 Thread reyelts
So is this a packaging error when building the source package for download from web2py.com? On Dec 25, 5:22 pm, Jonathan Lundell wrote: > On Dec 25, 2010, at 1:40 PM, reyelts wrote: > > > > > Either the code should be looking for the name 'version' (since that's

[web2py] ('str' object has no attribute 'update_record')

2010-12-27 Thread reyelts
I think I found another issue with upgrading from 1.81.4 to 1.91.4. My code that updates table entries craps out with the subject exception. I'm just doing the normal update_record as described in the book: elif form.accepts(request.vars,session,dbio=False): del form.vars['button']

[web2py] Re: ('str' object has no attribute 'update_record')

2010-12-27 Thread reyelts
Here's the complete traceback: Traceback (most recent call last): File "/media/EZTRAIN/web2py_lin/gluon/restricted.py", line 188, in restricted exec ccode in environment File "/media/EZTRAIN/web2py_lin/applications/canyonezt/controllers/ client.py", line 245, in File "/media/EZTRAIN/web

[web2py] Re: 1.91.4 error reading version file

2010-12-27 Thread reyelts
he download. On Dec 27, 9:52 am, Jonathan Lundell wrote: > On Dec 27, 2010, at 7:39 AM, reyelts wrote: > > > > > So is this a packaging error when building the source package for > > download from web2py.com? > > I got VERSION just now when I downloaded it. > <htt

[web2py] Re: 1.91.4 error reading version file

2010-12-28 Thread reyelts
Both downloads were done using Linux, which wouldn't be playing around with the names like Windows. The downloads were done to a clean/empty directory, so no infection from a prior file, either.

[web2py] Recaptcha and registration

2011-05-08 Thread reyelts
My application uses Recaptcha for user registration: auth.settings.register_captcha = Recaptcha(request,session.CAPTCHA_public,session.CAPTCHA_private) At some point, this has stopped working. My registration page gets the "Verify:" title, but no Recaptcha form with it. If I don't set auth.set

[web2py] Re: Recaptcha and registration

2011-05-09 Thread reyelts
That solved it. Thanks!