Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 

baweb

Requirements

Python 3.x

Setup

$ git clone https://github.com/cederstrom/baweb.git
$ cd baweb
$ mkvirtualenv --python=/usr/bin/python3 baweb
$ pip install -r requirements.txt
$ python db_create.py

Run

$ python run.py

Datebase cheatsheet

workon baweb-prod
cd baweb-prod
python

Flytta medlem mellan lag

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()

Ta bort medlem

from app.models import Team, TeamMember, User
from app import db

TeamMember.query.filter_by(id=1).delete()

db.session.commit()

Ta bort alla lag och medlemmar

from app.models import Team, TeamMember, User
from app import db

TeamMember.query.delete()
Team.query.delete()

db.session.commit()

Lägga till admin

from app.models import Team, TeamMember, User
from app import db

u = User(facebook_id=999999, nickname='nick name', email='name@example.com', is_admin=True, generation=99, favorite_sport='', best_dekk='')
db.session.add(u)

db.session.commit()

About

No description, website, or topics provided.

Resources

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •