Esempio n. 1
0
def get_view_data():
    user = get_user()
    return {
        'user': user if user else None,
        'company': str(user['company']) if user and user.get('company') else None,
        'topics': get_user_topics(user['_id']) if user else [],
        'companyName': get_user_company_name(user),
        'userSections': get_company_sections(user['company'] if user and user.get('company') else None)
    }
Esempio n. 2
0
def get_view_data():
    user = get_user()
    company = user['company'] if user and user.get('company') else None
    rv = {
        'user': user if user else None,
        'company': str(company),
        'topics': get_user_topics(user['_id']) if user else [],
        'companyName': get_user_company_name(user),
        'locators': get_vocabulary('locators'),
        'monitoring_list': get_monitoring_for_company(user),
    }

    rv.update(get_company_sections_monitoring_data(company))

    return rv