I need help! I am attempting to use ragendja with django to enable the
auth system to use email address for auth rather than username. I had
everything working fine with username but switching to email has been
now a nightmare.

The problem appears to be at line 13 in the
appenginepatcher.auth.backends.py. I've the snip here w/pointer to
line 13.
class ModelBackend(object):
       def authenticate(self, username=None, password=None):
                user = User.all().filter('username = ', username).get()
                logging.debug(" modified backend user is: "+str(user))
                if not user:
(line 13)>user = User.all().filter('email =', username).get()
                if user and user.check_password(password):
                        return user
                return None

I've used logging.debug to determine that everything before this line
runs but as soon as it hits 13, it just stops and returns. I've put
try/except around it to catch and exceptions and there appears none.
I've changed it from get() to fetch(1). When I do that I get a list
back with the data. However, if I try to do a 'for x in list' I can't
access the data.

I've tried users=User.all().filter('username =',username).fetch(1)
logging.debug(user is: "+str(users))
with this I see the users!
however if I try:
for user in user
      logging.debug("user is: "+user)

Nothing!!!!

Any help getting this to work or point me in the right direction is
greatly appreciated.

Also just to give full into in my model i'm using:

from ragendja.auth.models import EmailUser and my model is named User.
Elsewhere I"m calling rom django.contrib.auth.models import User to
get user model.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to