def signin_redirect(redirect=None, user=None):
 if redirect:
  return redirect
 elif (user is not None):
  return (userena_settings.USERENA_SIGNIN_REDIRECT_URL % {'username': user.username})
 else:
  return settings.LOGIN_REDIRECT_URL

def signin_redirect ( redirect = None , user = None ) : if redirect : return redirect elif ( user is not None ) : return ( userena_settings . USERENA_SIGNIN_REDIRECT_URL % { 'username' : user . username } ) else : return settings . LOGIN_REDIRECT_URL
redirect user after successful sign in .