Esempio n. 1
0
def splash(request):
    if not request.user.is_authenticated():
        raise exceptions.NotAuthenticated()

    response = shortcuts.redirect(horizon.get_user_home(request.user))
    if 'logout_reason' in request.COOKIES:
        response.delete_cookie('logout_reason')
    # Display Message of the Day message from the message files
    # located in MESSAGES_PATH
    if MESSAGES_PATH:
        notifications.process_message_notification(request, MESSAGES_PATH)
    return response
Esempio n. 2
0
def splash(request):
    if not request.user.is_authenticated():
        raise exceptions.NotAuthenticated()

    response = shortcuts.redirect(horizon.get_user_home(request.user))
    if 'logout_reason' in request.COOKIES:
        response.delete_cookie('logout_reason')
    # Display Message of the Day message from the message files
    # located in MESSAGES_PATH
    if MESSAGES_PATH:
        notifications.process_message_notification(request, MESSAGES_PATH)
    return response
Esempio n. 3
0
def splash(request):
    #LOG.info("xxx enter splash!")
    #LOG.info("request is")
    #LOG.info(request)

    if not request.user.is_authenticated():
        raise exceptions.NotAuthenticated()
    '''url = "sunny"

    context = {
        'url': url,
    }'''
    '''if not request.user.is_authenticated():
    return shortcuts.render(request, 'index.html',
                        status=200)'''

    #LOG.info("request.user")
    #LOG.info(request.user)

    #LOG.info("horizon.get_user_home(request.user)")
    #LOG.info(horizon.get_user_home(request.user))

    response = shortcuts.redirect(horizon.get_user_home(request.user))

    #LOG.info("request.user")
    #LOG.info(request.user)

    #LOG.info("horizon.get_user_home(request.user)")
    #LOG.info(horizon.get_user_home(request.user))

    #LOG.info("response")
    #LOG.info(response)
    #LOG.info("after response")

    if 'logout_reason' in request.COOKIES:
        response.delete_cookie('logout_reason')
    if 'logout_status' in request.COOKIES:
        response.delete_cookie('logout_status')
    # Display Message of the Day message from the message files
    # located in MESSAGES_PATH
    if MESSAGES_PATH:
        notifications.process_message_notification(request, MESSAGES_PATH)
    return response