I had deleted GAE's tables before contacting you; I've just deleted them again but I get the same behaviour. There is perhaps a subtle difference between dev_appserver and the real-deal GAE.
I'll put together a stand-alone app tomorrow. 2010/1/15 mdipierro <[email protected]> > One more test. What bothers me is that is works on dev_appserver but > not when deployed. There must be some corrupted data in the database. > Is it an option for you to delete all data on GAE? > > On Jan 15, 12:22 pm, Carl <[email protected]> wrote: > > I've taken out the orderby clauses but the login failure still happens > (I've > > had those clauses in for earlier versions of web2py but it was worth > > looking). > > > > Perhaps these two statements (default.py in user() ) are the issue on > GAE? > > db.auth_user.billing_country.requires = IS_NULL_OR(IS_NOT_EMPTY()) > > db.auth_user.country.requires = IS_NULL_OR(IS_NOT_EMPTY()) > > > > I am using a custom form which doesn't not display these two fields so > I've > > added these two statements to keep the registration process happy which > > would otherwise want values from the user for them. > > > > in db.py both fields have the clause: > > requires=IS_NULL_OR(IS_IN_DB(db,db.iso3166.id,'%(country)s'))) > > > > Does that aim/explanation make sense to you? The code is quite old but > > perhaps Web2py is translating to GAE in a subtley different way? If I > remove > > both statements then registration fails so I can't simply remove them to > > test if the app works on GAE. > > > > Is there an alternative approach I could take? At least to test further? > > > > 2010/1/15 mdipierro <[email protected]> > > > > > I see a lot of orderby in those validators that create problems. > > > > > I think the problem is there. > > > > > Try remove the orderby and see if the error goes away. > > > > > If it does there are two options: > > > 1) you need an index > > > 2) the query is somehow invalid on GAE > > > > > Massimo > > > > > On Jan 15, 11:17 am, Carl <[email protected]> wrote: > > > > I made the changes you listed but the failed login still persists > (you > > > > probably expected it to but I was forever hopeful! :) > > > > > > I'll see if I can create a small app that replicates the issue and > send > > > it > > > > to you. > > > > thanks for your time. > > > > > > 2010/1/15 mdipierro <[email protected]> > > > > > > > I do not know why you experience the behavior that you do but there > > > > > are some errors in those commented lines: > > > > > > > 1) > > > > > > > #cdrdb.Field('country', db.iso3166, requires=IS_NULL_OR > > > > > (IS_INT_IN_RANGE(0, 1e100))), > > > > > > > should be > > > > > > > cdrdb.Field('country', db.iso3166, requires=IS_IN_DB > > > > > (db,db.iso3166.id,'%(country)s')) > > > > > > > 2) > > > > > > > #cdrdb.Field('agent_salutation', db.salutations, > > > > > requires=IS_NULL_OR(IS_INT_IN_RANGE(0, 1e100))), > > > > > > > should be > > > > > > > cdrdb.Field('agent_salutation', db.salutations, > > > > > requires=IS_NULL_OR(db,db.salutations.id,'%(salutation)s')) > > > > > > > sure you want a reference for this and not a IS_IN_SET? > > > > > > > 3) > > > > > > > #cdrdb.Field('agent_country', db.iso3166, label='Country', > > > > > requires=IS_NULL_OR(IS_INT_IN_RANGE(0, 1e100))), > > > > > > > should be > > > > > > > cdrdb.Field('agent_country', db.iso3166, label='Country', > > > > > requires=IS_NULL_OR(IS_IN_DB(db,db.iso3166.id,'%(country)s')) > > > > > > > 4) > > > > > > > #cdrdb.Field('billing_country', db.iso3166, label='Billing > > > > > country', requires=IS_NULL_OR(IS_INT_IN_RANGE(0, 1e100))) > > > > > > > should be > > > > > > > #cdrdb.Field('billing_country', db.iso3166, label='Billing > > > > > country', requires=IS_NULL_OR(IS_IN_DB(db,db.iso3166.id > ,'%(country) > > > > > s')) > > > > > > > 5) > > > > > > > #cdrdb.auth_user.country.requires = IS_NULL_OR(IS_NOT_EMPTY()) > > > > > > > I am not so sure what you need here. > > > > > > > Massimo > > > > > > > On Jan 15, 10:38 am, Carl <[email protected]> wrote: > > > > > > hi > > > > > > > > I gotten down to the area that's tripping up. > > > > > > > > My app will login correctly if I comment out the following lines; > > > > > > I've put those commented lines in context below... > > > > > > > > FILE: models/dp.py > > > > > > db.define_table('iso3166', > > > > > > SQLField('country', 'string', length=128, > > > > > > required=True), > > > > > > SQLField('country_iso', 'integer', > required=True), > > > > > > SQLField('country_order', 'integer', > required=True)) > > > > > > > > db.define_table('salutations', > > > > > > SQLField('salutation', 'string', length=128, > > > > > > required=True), > > > > > > SQLField('salutation_order', 'integer', > > > > > > required=True)) > > > > > > > > auth.settings.table_user = db.define_table( > > > > > > auth.settings.table_user_name, > > > > > > db.Field('email', 'string', length=254, unique=True, > > > notnull=True, > > > > > > required=True, > > > > > > requires = [IS_LOWER(), > > > > > > IS_EMAIL(), > > > > > > IS_NOT_IN_DB > > > > > > (db,'%s.email'%auth.settings.table_user_name)]), > > > > > > db.Field('password', 'password', length=512, readable=False, > > > > > > notnull=True, required=True, label='Password', > > > > > > requires = [IS_NOT_EMPTY(), > > > > > > > CRYPT(key='12angrymen12apollo57envoy')]), > > > > > > db.Field('registration_key', length=128, writable=False, > > > > > > readable=False, default=''), > > > > > > db.Field('first_name', 'string', length=128), > > > > > > db.Field('last_name', 'string', length=128), > > > > > > db.Field('job_title', 'string', length=128), > > > > > > db.Field('postcode', 'string', length=12), > > > > > > #cdrdb.Field('country', db.iso3166, requires=IS_NULL_OR > > > > > > (IS_INT_IN_RANGE(0, 1e100))), > > > > > > #cdrdb.Field('agent_salutation', db.salutations, > > > > > > requires=IS_NULL_OR(IS_INT_IN_RANGE(0, 1e100))), > > > > > > db.Field('agent_name', 'string', length=128, label='Company > > > > > > name'), > > > > > > db.Field('agent_address', 'text', label='Company address'), > > > > > > db.Field('agent_postcode', 'string', length=12, > label='Company > > > > > > postcode'), > > > > > > #cdrdb.Field('agent_country', db.iso3166, label='Country', > > > > > > requires=IS_NULL_OR(IS_INT_IN_RANGE(0, 1e100))), > > > > > > db.Field('billing_name', 'string', length=128, label='Billing > > > > > > company name'), > > > > > > db.Field('billing_address', 'text', label='Billing address'), > > > > > > db.Field('billing_postcode', 'string', length=12, > label='Billing > > > > > > postcode'), > > > > > > #cdrdb.Field('billing_country', db.iso3166, label='Billing > > > > > > country', requires=IS_NULL_OR(IS_INT_IN_RANGE(0, 1e100))) > > > > > > ) > > > > > > > > FILE: controllers/default.py > > > > > > > > def user(): > > > > > > auth.settings.expiration = 14 * 24 * 60 * 60 # 14 day > sessions > > > > > > auth.settings.register_onaccept = lambda form: > > > registerAgent(form) > > > > > > auth.settings.register_next = URL(r=request,f='account') > > > > > > auth.settings.login_next = URL(r=request,f='account') > > > > > > > > #cdrdb.auth_user.agent_salutation.requires = IS_IN_DB(db, > > > > > > db.salutations.id, '%(salutation)s', > > > > > > orderby=db.salutations.salutation_order) > > > > > > #cdrdb.auth_user.agent_country.requires = IS_IN_DB(db, > > > > > > db.iso3166.id, '%(country)s', orderby=db.iso3166.country_order) > > > > > > > > #cdrdb.auth_user.billing_country.requires = > > > IS_NULL_OR(IS_NOT_EMPTY > > > > > > ()) > > > > > > #cdrdb.auth_user.country.requires = > IS_NULL_OR(IS_NOT_EMPTY()) > > > > > > > > return dict(form=auth()) > > > > > > > > user.html > > > > > > NOTE: I've NOT had to comment out any lines > > > > > > {{extend 'layout.html'}} > > > > > > <h2>{{=request.args(0).replace('_',' ').capitalize()}}</h2> > > > > > > <p>Test 7</p> > > > > > > {{if request.args(0)=='login':}} > > > > > > {{=form}} > > > > > > <a href="{{=URL(r=request,args='register')}}">register</a><br /> > > > > > > <a href="{{=URL(r=request,args='retrieve_password')}}">lost > > > password</ > > > > > > a><br /> > > > > > > {{elif request.args(0)=='register':}} > > > > > > {{=form.custom.begin}} > > > > > > <table> > > > > > > <tr id="auth_user_email__row"><td><label for="auth_user_email" > > > > > > id="auth_user_email__label">Email:</label></td><td> > > > > > > {{=form.custom.widget.email}}</td><td></td></tr> > > > > > > <tr id="auth_user_password__row"><td><label > for="auth_user_password" > > > > > > id="auth_user_password__label">Password:</label></td><td> > > > > > > {{=form.custom.widget.password}}</td><td></td></tr> > > > > > > <tr class="auth_user_password_two__row" ><td><label > > > for="password_two" > > > > > > id="auth_user_password_two__label">Verify password:</label></ > > > > > > td><td><input name="password_two" type="password" /> > > > > > > {{if form.errors and form.errors.password_two:}}<div > class="error" > > > > > > id="password_two__error">Password fields don't > match</div>{{pass}}</ > > > > > > td><td></td></tr> > > > > > > <tr id="auth_user_agent_salutation__row"><td><label > > > > > > for="auth_user_agent_salutation" > > > > > > id="auth_user_agent_salutation__label">Title:</label></td><td> > > > > > > {{=form.custom.widget.agent_salutation}}</td><td></td></tr> > > > > > > <tr id="auth_user_first_name__row"><td><label > > > > > > for="auth_user_first_name" id="auth_user_first_name__label">First > > > > > > > Name:</label></td><td>{{=form.custom.widget.first_name}}</td><td></ > > > > > > td></tr> > > > > > > <tr id="auth_user_last_name__row"><td><label > > > for="auth_user_last_name" > > > > > > id="auth_user_last_name__label">Last Name:</label></td><td> > > > > > > {{=form.custom.widget.last_name}}</td><td></td></tr> > > > > > > <tr id="auth_user_agent_name__row"><td><label > > > > > > for="auth_user_agent_name" > id="auth_user_agent_name__label">Company > > > > > > > name:</label></td><td>{{=form.custom.widget.agent_name}}</td><td></ > > > > > > td></tr> > > > > > > <tr id="auth_user_agent_country"><td><label > > > > > > for="auth_user_agent_country" > > > > > > id="auth_user_agent_country__label">Country:</label></td><td> > > > > > > {{=form.custom.widget.agent_country}}</td><td></td></tr> > > > > > > <tr id="submit_record__row"><td></td><td><input type="submit" > > > > > > value="Register" /></td><td></td></tr> > > > > > > </table> > > > > > > {{=form.custom.end}} > > > > > > {{else:}} > > > > > > {{=form}} > > > > > > {{pass}} > > > > > > > > BACK TO POSTING: > > > > > > So... hopefully this in't too much for you to parse. However, say > the > > > > > > word and I'll build an app. > > > > > > > > On Jan 14, 10:47 pm, Carl <[email protected]> wrote: > > > > > > > > > yes I can login successfully using Welcome so that does help > narrow > > > it > > > > > down. > > > > > > > I start the skeleton build tomorrow! > > > > > > > > > all the best > > > > > > > > > 2010/1/14 mdipierro <[email protected]> > > > > > > > > > > Can you register and login in the Welcome > > > > ... > > > > read more ยป > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<web2py%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > > >--
You received this message because you are subscribed to the Google Groups "web2py-users" 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/web2py?hl=en.

