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 <mdipie...@cs.depaul.edu>

> 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 <carl.ro...@gmail.com> 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 <carl.ro...@gmail.com> 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 <mdipie...@cs.depaul.edu>
> >
> > > > Can you register and login in the Welcome app? that should be the
> > > > first test.
> >
> > > > On Jan 14, 3:43 pm, Carl <carl.ro...@gmail.com> wrote:
> > > > > I went into each corner of my app on dev_appserver and then
> uploaded to
> > > > GAE
> > > > > but this didn't change the login behaviour.
> >
> > > > > Let me rebuild my app part by part from a skeleton and find the
> smallest
> > > > app
> > > > > that breaks. If I don't figure it out from that I can send you the
> app
> > > > that
> > > > > works and the app that breaks.
> >
> > > > > My first task of tomorrow!
> >
> > > > > 2010/1/14 mdipierro <mdipie...@cs.depaul.edu>
> >
> > > > > > Did you ever try register and login locally with dev-appserver
> before
> > > > > > uploading on GAE? Perhaps some index is missing and by running
> > > > > > locally, it would re-create the missing index.
> > > > > > Anyway, the behavior is strange and I do not fully understand it.
> > > > > > Could you email me the app?
> >
> > > > > > On Jan 14, 12:42 pm, Carl <carl.ro...@gmail.com> wrote:
> > > > > > > Trying to login after several "counter" calls resets the count.
> >
> > > > > > > 2010/1/14 Carl <carl.ro...@gmail.com>
> >
> > > > > > > > I added a function for counter... it works on GAE (and it
> works
> > > > locally
> > > > > > > > too)
> >
> > > > > > > > 2010/1/14 mdipierro <mdipie...@cs.depaul.edu>
> >
> > > > > > > >> Do your sessions work?
> >
> > > > > > > >> can you try a simple counter?
> >
> > > > > > > >> def counter(): return dict(c=session.c=(session.c or 0)+1)
> >
> > > > > > > >> On Jan 14, 11:50 am, Carl <carl.ro...@gmail.com> wrote:
> > > > > > > >> > Registering a new user... I can see a new row in GAE's
> data
> > > > viewer
> > > > > > but
> > > > > > > >> > once created I don't get automatically logged in (which
> does
> > > > happen
> > > > > > > >> > locally). When I then try a login with these new user
> > > > credentials I
> > > > > > > >> > get the same silent fail.
> >
> > > > > > > >> > On Jan 14, 5:32 pm, mdipierro <mdipie...@cs.depaul.edu>
> wrote:
> >
> > > > > > > >> > > Can you please run a test to better identify the
> problem. Can
> > > > you
> > > > > > > >> > > register a new user and try login as the new user? Same
> > > > problem?
> >
> > > > > > > >> > > On Jan 14, 11:01 am, Carl <carl.ro...@gmail.com> wrote:
> >
> > > > > > > >> > > > def user():
> > > > > > > >> > > >     return dict(form=auth())
> >
> > > > > > > >> > > > Locally using SQLite or dev_appserver I can login to
> my
> > > > > > application.
> > > > > > > >> > > > When I upload to GAE logging in silently fail, I am
> > > > redirected
> > > > > > from
> > > > > > > >> > > > init/default/user/login to init/default/index and no
> jquery
> > > > > > flash
> > > > > > > >> > > > message appears. No log entries are added to GAE.
> >
> > > > > > > >> > > > In Web2py 1.67.2 login worked. Now in Web2py 1.74.5 it
> does
> > > > not.
> > > > > > > >> Sorry
> > > > > > > >> > > > for the large gap between version... releases were
> thick and
> > > > > > fast at
> > > > > > > >> > > > the end of '09! :)
> >
> > > > > > > >> > > > Has anyone has this experience? Any pointers?
> >
> > > > > > > >> > > > Functions that don't require a login session execute
> and
> > > > return
> > > > > > fine
> > > > > > > >> > > > on GAE.
> >
> > > > > > > >> --
> > > > > > > >> 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<web2py%2bunsubscr...@googlegroups.com>
> <web2py%2bunsubscr...@googlegroups.com<web2py%252bunsubscr...@googlegroups.com>
> >
> > > > <web2py%2bunsubscr...@googlegroups.com<web2py%252bunsubscr...@googlegroups.com>
> <web2py%252bunsubscr...@googlegroups. com>
> >
> > > > > > <web2py%2bunsubscr...@googlegroups.com<web2py%252bunsubscr...@googlegroups.com>
> <web2py%252bunsubscr...@googlegroups. com>
> > > > <web2py%252bunsubscr...@googlegroups.com<web2py%25252bunsubscr...@googlegroups.com>
> <web2py%25252bunsubscr...@googlegro ups.com>
> >
> > > > > > > >> .
> > > > > > > >> 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 web...@googlegroups.com.
> > > > > > To unsubscribe from this group, send email to
> > > > > > web2py+unsubscr...@googlegroups.com<web2py%2bunsubscr...@googlegroups.com>
> <web2py%2bunsubscr...@googlegroups.com<web2py%252bunsubscr...@googlegroups.com>
> >
> > > > <web2py%2bunsubscr...@googlegroups.com<web2py%252bunsubscr...@googlegroups.com>
> <web2py%252bunsubscr...@googlegroups. com>
> >
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/web2py?hl=en.
> >
> > > > --
> > > > You received this message because you are
> >
> > ...
> >
> > 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 web...@googlegroups.com.
> To unsubscribe from this group, send email to
> web2py+unsubscr...@googlegroups.com<web2py%2bunsubscr...@googlegroups.com>
> .
> 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 web...@googlegroups.com.
To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

Reply via email to