Minor template refactor and cli.py user interface enhancement #5
8
cli.py
8
cli.py
|
@ -49,7 +49,7 @@ def user_add(username, password):
|
|||
user = User(username=username, password=password)
|
||||
with db.get_session() as session:
|
||||
session.add(user)
|
||||
print("User succesfully added.")
|
||||
print("User successfully added.")
|
||||
|
||||
|
||||
@user.command('list')
|
||||
|
@ -138,7 +138,7 @@ def event_add(name, starts_at, ends_at):
|
|||
event = Event(name=name, starts_at=starts_at, ends_at=ends_at)
|
||||
session.add(event)
|
||||
session.flush()
|
||||
print("Event succesfully added.")
|
||||
print("Event successfully added.")
|
||||
print(tabulate_events([event]))
|
||||
|
||||
|
||||
|
@ -214,7 +214,7 @@ def event_set(event_uid, name, start, end):
|
|||
with db.get_session() as session:
|
||||
session.add(event)
|
||||
session.flush()
|
||||
print("Event succesfully edited.")
|
||||
print("Event successfully edited.")
|
||||
print(tabulate_events([event]))
|
||||
|
||||
|
||||
|
@ -237,7 +237,7 @@ def product_add(name, price):
|
|||
product = Product(name=name, price=price)
|
||||
with db.get_session() as session:
|
||||
session.add(product)
|
||||
print("Product succesfully added.")
|
||||
print("Product successfully added.")
|
||||
|
||||
|
||||
@product.command('list')
|
||||
|
|
Loading…
Reference in New Issue
Block a user