# Path: tsundiary/models.py
# class User(db.Model):
# class Post(db.Model):
#     def verify_password(self, password):
#     def set_password(self, password):
#     def __init__(self, name, password, email=None, invite_key=""):
#     def __repr__(self):
#     def viewable_by(self, viewer, today):
#     def __init__(self, user_sid, content, posted_date):
#     def __repr__(self):
# def init_db():
# def ensure_db_exists():
# def populate_db():


from tsundiary import User, Post, db
from datetime import date, datetime, timedelta

def delete_user(sid):
    Post.query.filter_by(user_sid=sid).delete()
    User.query.filter_by(sid=sid).delete()

# Path: tsundiary/models.py
# class User(db.Model):
# class Post(db.Model):
#     def verify_password(self, password):
#     def set_password(self, password):
#     def __init__(self, name, password, email=None, invite_key=""):
#     def __repr__(self):
#     def viewable_by(self, viewer, today):
#     def __init__(self, user_sid, content, posted_date):
#     def __repr__(self):
# def init_db():
# def ensure_db_exists():
# def populate_db():


# Path: adminstuff.py
from tsundiary import User, Post, db
from datetime import date, datetime, timedelta


def delete_user(sid):
    Post.query.filter_by(user_sid=sid).delete()
    User.query.filter_by(sid=sid).delete()

    db.session.commit()