Example #1
0
def update(info=None):
    if 'photo' in request.form:
        process_image(request.form['photo'][22:], info['uid'])
        get_image.cache_clear()

    ldap_update_profile(request.json, info['uid'])
    return jsonify({"success": True}), 200
Example #2
0
def clear_cache(info=None):
    if not ldap_is_rtp(info['user_obj']):
        return redirect("/")

    ldap_get_active_members.cache_clear()
    ldap_get_intro_members.cache_clear()
    ldap_get_onfloor_members.cache_clear()
    ldap_get_current_students.cache_clear()
    ldap_get_all_members.cache_clear()
    ldap_get_groups.cache_clear()
    ldap_get_group_desc.cache_clear()
    ldap_get_eboard.cache_clear()
    ldap_search_members.cache_clear()
    ldap_get_year.cache_clear()
    get_image.cache_clear()
    get_gravatar.cache_clear()
    proxy_image.cache_clear()

    flash('Cache cleared!')

    return redirect(request.referrer, 302)
Example #3
0
def upload(info=None):
    if 'photo' in request.form:
        process_image(request.form['photo'][22:], info['uid'])
        get_image.cache_clear()
    return redirect('/', 302)