diff options
author | emkael <emkael@tlen.pl> | 2017-07-31 14:42:49 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-07-31 14:42:49 +0200 |
commit | e6c2b0521760d32ac3be5b5ca66b98f2c67046e4 (patch) | |
tree | dbf049de8438b976e9e3df140a305587e32228e0 /playoff.py | |
parent | 1a0d4323cd25b1653663013ca3183fb0b67a878e (diff) |
Customizable JS settings
Diffstat (limited to 'playoff.py')
-rw-r--r-- | playoff.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -96,7 +96,13 @@ def get_match_grid(grid, matches, width, height): ) row_no += 1 col_no += 1 - return p_temp.MATCH_GRID % (width, height, width, height, grid_boxes) + canvas_settings = [] + if 'canvas' in settings: + for setting, value in settings['canvas'].iteritems(): + canvas_settings.append( + 'data-%s="%s"' % (setting.replace('_', '-'), str(value)) + ) + return p_temp.MATCH_GRID % (width, height, width, height, ' '.join(canvas_settings), grid_boxes) def get_leaderboard_table(leaderboard): if len([t for t in leaderboard if t is not None]) == 0: |