Skip to content
Advertisement

Using SQLAlchemy, I need to assign users into pools, and a ranking for each pool they’re in

Here is the relevant code.

I’m writing a Flask application where users can join pools and compete against others within those pools (currently, pools and users are in a many to many relationship). Each user will need a rating for each pool that he/she is in (Elo Rating), and I’m not sure how to implement that into my existing structure. Any suggestions to implement it that either fit into my solution or change it would be appreciated.

(Right now, each user has a rating but it is shared amongst pools, which does not make sense for Elo)

JavaScript

Advertisement

Answer

For me, you should replace association table (pool_user) with association model (UserPool).

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement