Ejemplo n.º 1
0
def config_user_edit():
    #print(request.form)
    user_name = request.form.getlist("user")[0]
    password = request.form.getlist("password")[0]
    user = Users()
    user.add_user(user_name, password)
    kif()
    return render_template('config_user.html', users=user.get_users())
Ejemplo n.º 2
0
def rate():
    data = DuelData()
    user = Users()
    data.create_graph()
    user_names = []
    for user_name, password in user.get_users().items():
        data.create_user_graph(user_name)
        user_names.append(user_name)
    return render_template('rate.html', user_names=user_names)
Ejemplo n.º 3
0
def get():
    result = Users.get_users()
    return render_template('Users.html',
                           title="Просмотр пользоватей",
                           menu=menu,
                           users=result)
Ejemplo n.º 4
0
 def test_adds_one_user_to_database(self):
     users = Users(self.connect())
     person_id = authorise_user("4/7J5j83SwLmZGEg6mADDnotLWdZnMyiRZFzOIWtE1Wxk", "",
                                self.oauth_http,
                                self.connect())
     self.assertEqual(len(users.get_users()), 1)
Ejemplo n.º 5
0
def delete_user():
    user_name = request.form.getlist("user")[0]
    user = Users()
    user.delete_user(user_name)
    kif()
    return render_template('config_user.html', users=user.get_users())
Ejemplo n.º 6
0
#!/usr/bin/env python

from user import Users
from db import get_connection
from update import ensure_calendar_updated

if __name__ == "__main__":
    print "Starting up"
    conn = get_connection()
    users = Users(conn)
    for person_id in users.get_users():
        print "Updating", person_id
        ensure_calendar_updated(person_id, conn)
Ejemplo n.º 7
0
 def test_a_get_users(self):
     self.assertEqual(8, len(Users.get_users()))