Ok I found why I was redirecting to an other controller from default/index
function...

How can I replace default controller by my own "default" controller? Is it
something possible?

Richard



On Wed, Nov 24, 2010 at 12:09 PM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> You meen that this, any where in controllers
>
> auth.messages.logged_in=DIV(T('Hello '),
>             str(auth.user and auth.user.first_name),
>             BR(),
>             T('Welcome on the '),
>             appTitle,
>             session.counter)
>
> Should prompt in response.flash once at login?
>
> Not working for me...
>
> Richard
>
>
>
> On Wed, Nov 24, 2010 at 12:06 PM, mdipierro <mdipie...@cs.depaul.edu>wrote:
>
>> Well be used to set the flash immediately after login. You can put it
>> anywere you want (models or same controller as user action) and should
>> work.
>>
>> On Nov 24, 10:56 am, Richard Vézina <ml.richard.vez...@gmail.com>
>> wrote:
>> > How do I get the auth.messages.logged_in in response.flash only at
>> login?
>> >
>> > I try many different things without success.
>> >
>> > Is auth.messages.logged_in as to be put in auth form controller?
>> >
>> > On Wed, Nov 24, 2010 at 11:18 AM, mdipierro <mdipie...@cs.depaul.edu>
>> wrote:
>> > > how about something like this?
>> >
>> > > auth.messages.logged_in=T('Hello %(first_name)s and welcome on the
>> > > '+appTitle')
>> >
>> > > def index():
>> > >    """
>> > >    Index page
>> > >    """
>> > >    session.counter = (session.counter or 0) + 1
>> > >    if auth.user and auth.user.first_name!=0 and session.counter<=0:
>> > >         pass
>> > >     elif session.counter>0:
>> > >        pass
>> > >    else:
>> > >         if not response.flash: response.flash = T('Hello')
>> > >    return dict(message=T(''))
>> >
>> > > On Nov 24, 10:05 am, Richard Vézina <ml.richard.vez...@gmail.com>
>> > > wrote:
>> > > > Hello
>> >
>> > > > I need to have a response.flash on index page at login but not when
>> the
>> > > user
>> > > > come back on index page during a session. I try to user
>> session.counter
>> > > but
>> > > > the session is not reset until the cookies are erase I think.
>> >
>> > > > Here my index controller (*not working*) :
>> >
>> > > > def index():
>> > > >     """
>> > > >     Index page
>> > > >     """
>> > > >     session.counter = (session.counter or 0) + 1
>> > > >     if auth.user and auth.user.first_name!=0 and session.counter<=0:
>> > > >         response.flash = DIV(T('Hello ')+str(auth.user and
>> > > > auth.user.first_name),BR(),T('Welcome on the '),appTitle)
>> > > >     elif session.counter>0:
>> > > >         pass
>> > > >     else:
>> > > >         response.flash = T('Hello')
>> > > >     return dict(message=T(''))
>> >
>> > > > Richard
>> >
>> >
>>
>
>

Reply via email to