Hi sart,
> userlastname = db.GqlQuery("SELECT lastname FROM User WHERE login
> = :login AND password = :password")
GQL is not SQL - there is currently no way to just get a single field
from an entity like you are trying above - you can only select
complete entities - so the GQL you wrote must read:
db.GqlQuery("SELECT * FROM User WHERE login = :login AND password
= :password",login="X",password="Y")
also you need to pass bound variables (like :login and :password) to
the GqlQuery method.
In your example this should work:
user = User.gql("WHERE login = :login AND password
= :password",login=self.request.get('login'),password=self.request.get('password')).get()
if user is not None:
lastname = user.lastname