Example #1
0
def index(request):
    logger.info('index')

    logger.info('username = '******'form':form}

    return show(request, c)
Example #2
0
def update(request):
    logger.info('update')

    if request.method == 'POST':
        user_form = UserForm(request.POST, instance=SERVICES.getUserInfo(request.user.username))
        result = SERVICES.updateUserInfo(user_form)
        if not result == 'success':
            fail_form = UserForm(request.POST)
            c = {'form':fail_form}
            c.update({'form_message':MSGS.UPD_FAIL})
            return show(request, c)
    c = {'form_message': MSGS.UPD_SUCCESS}
    c.update({'form':user_form})
    return show(request, c)