Ejemplo n.º 1
0
def beta_participants_csv():
	sep = ','
	if request.values.get('excel', None) is not None:
		sep = ';'
	bu = BetaUser.all()
	bu.filter('participate =', True)
	testers = [u for u in bu if u.inbeta]
	buf = cStringIO.StringIO()
	buf.write('# name, email, udid, devtype\n')
	for u in testers:
		s = sep.join((u.name, u.email, u.udid, u.devtype))+'\n'
		buf.write(s.encode('utf-8'))
	return Response(buf.getvalue(), mimetype='text/csv')
Ejemplo n.º 2
0
def participant_queue():
    fetch = request.values.get('fetch', 'all')
    bu = BetaUser.all()
    bu.filter('participate =', True)
    users = bu.fetch(100)
    queue = []
    if fetch == 'all':
        queue = users
    elif fetch == 'notinbeta':
        queue = [u for u in users if not u.inbeta]
    elif fetch == 'inbeta':
        queue = [u for u in users if u.inbeta]
    return render_template('profile-list.html', queue=queue)
Ejemplo n.º 3
0
def beta_participants_csv():
    sep = ','
    if request.values.get('excel', None) is not None:
        sep = ';'
    notprov = request.values.get('notprovisioned', None) is not None
    bu = BetaUser.all()
    bu.filter('participate =', True)
    testers = [u for u in bu if u.inbeta]
    buf = cStringIO.StringIO()
    buf.write('# name, email, udid, devtype\n')
    for u in testers:
        br = BetaRelease.get_latest_release()
        if notprov and br.udids is not None and u.udid in br.udids:
            continue
        s = sep.join((u.name, u.email, u.udid, u.devtype))+'\n'
        buf.write(s.encode('utf-8'))
    return Response(buf.getvalue(), mimetype='text/csv')
Ejemplo n.º 4
0
def participant_queue():
	bu = BetaUser.all()
	bu.filter('participate =', True)
	users = bu.fetch(100)
	return render_template('profile-list.html', queue=users)
Ejemplo n.º 5
0
def get_emailable_betausers():
    query = BetaUser.all()
    query.filter('inbeta =', True)
    query.filter('emailnotify =', True)
    bu = query.fetch(200)
    return [ u.email for u in bu ]