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
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
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,
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
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
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
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
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
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
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
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\
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
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
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
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
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
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
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
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
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
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
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
/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
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
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
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
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']
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
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
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.
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
That solved it. Thanks!
32 matches
Mail list logo