Python 3.8
$ git clone https://github.com/cederstrom/baweb.git
$ cd baweb
$ mkvirtualenv --python=/usr/bin/python3.8 baweb
$ pip install -r requirements.txt
$ python db_create.py
$ python run.py
workon baweb-prod
cd baweb-prod
python
from app.models import Team, TeamMember, User
from app import db
m = TeamMember.query.get(1)
Team.query.get(1).members.append(m)
Team.query.get(2).members.remove(m)
db.session.commit()
from app.models import Team, TeamMember, User
from app import db
TeamMember.query.filter_by(id=1).delete()
db.session.commit()
from app.models import Team, TeamMember, User
from app import db
TeamMember.query.delete()
Team.query.delete()
db.session.commit()
from app.models import Team, TeamMember, User
from app import db
u = User(facebook_id=999999, nickname='nick name', email='[email protected]', is_admin=True, generation=99, favorite_sport='', best_dekk='')
db.session.add(u)
db.session.commit()