Ejemplo n.º 1
0
def groups_list():
    title = 'Groups' 
    prompt = 'Choose'
    groups = app.groups_pages.keys()
    items = [(group, ext_url_for('.groups', group=group)) for group in groups]
    items.sort(key=lambda (group, ext_url): group)
    content = util.format_menu(title, prompt, items)
    return make_xml_response(content)    
Ejemplo n.º 2
0
def menu():
    title = 'Menu' 
    prompt = 'Choose'
    groups = app.groups_pages.keys()

    search_url = '%s' % ext_url_for('.users')
    sample_search_url = '%s?phrase=%s' % (search_url, 'a')
    groups_url = ext_url_for('.groups_list')

    items = [(SEARCH_ITEM_TITLE, search_url),
             (GROUPS_ITEM_TITLE, groups_url)]
    content = util.format_menu(title, prompt, items)
    return make_xml_response(content)