From 0a27bbf9ce1f5b1a52bc62ff4d9e5c2f960b030c Mon Sep 17 00:00:00 2001 From: Michal Zimniewicz Date: Sun, 9 Oct 2016 11:27:06 +0200 Subject: Initial commit --- ql/orm/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 ql/orm/utils.py (limited to 'ql/orm/utils.py') diff --git a/ql/orm/utils.py b/ql/orm/utils.py new file mode 100644 index 0000000..e5d96e2 --- /dev/null +++ b/ql/orm/utils.py @@ -0,0 +1,7 @@ +from .models import Team + + +def get_num_of_tables(): + num_of_teams = Team.objects.count() + assert num_of_teams % 2 == 0 + return int(num_of_teams / 2) -- cgit v1.2.3