diff options
author | emkael <emkael@tlen.pl> | 2016-11-14 23:39:36 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-11-14 23:41:59 +0100 |
commit | ea101d05fb55b550a3bf2b56160d640914bbfefa (patch) | |
tree | 1cbe520d3196ced812f67948d359f8ade01b1b33 /src/bidding_data.py | |
parent | 98eecacf370fd9f6d3fedba51e632a9b52f8374d (diff) |
* CSS added from separate file
Diffstat (limited to 'src/bidding_data.py')
-rw-r--r-- | src/bidding_data.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bidding_data.py b/src/bidding_data.py index f0b55d8..7422653 100644 --- a/src/bidding_data.py +++ b/src/bidding_data.py @@ -469,6 +469,20 @@ class JFRBidding(object): 'script', src='javas/bidding.js', type='text/javascript') jquery_scripts[0].insert_after(bidding_script) + # check for bidding.css + bidding_styles = [css for css in + board_content.find_all( + 'link', + rel='stylesheet', + href='css/bidding.css')] + log.getLogger('scripts').debug('found %d bidding.css sheets', + len(bidding_styles)) + # add if none exist + if len(bidding_styles) == 0: + bidding_style = board_content.new_tag( + 'link', rel='stylesheet', + href='css/bidding.css') + jquery_scripts[0].insert_after(bidding_style) board_html.seek(0) board_html.write(board_content.prettify( 'utf-8', formatter='html')) |