WIP on action/log

This commit is contained in:
2018-07-05 01:01:18 +02:00
parent bee3fd96b5
commit e421731608
4 changed files with 48 additions and 12 deletions

View File

@@ -45,8 +45,8 @@ def create_project(args, conn):
cursor.execute(query, (getpass.getuser(), args.create_name, status, datetime.datetime.now(),))
project_id = cursor.lastrowid
action.create_action(cursor, project_id=project_id)
action_message = '{} (status: {})'.format(args.create_name, status)
action.create_action(cursor, project_id=project_id, message=action_message)
print('created project {}: {} (status: {})'.format(project_id, args.create_name, status))
@@ -100,6 +100,7 @@ def list_project(active_project_id, conn):
cursor = conn.cursor()
cursor.execute(query)
for row in cursor.fetchall():
logging.debug('Project row: {}'.format(row))
project_id, username, name, status, date, nb_task = row
print('{:1} {:2d}: ({:8}) | {} | {} ({} tasks)'.format('*' if active_project_id == project_id else '',
project_id, username, status, name, nb_task))