Skip to content

Commit

Permalink
Fix game performance issue and logic to send matches. (#146)
Browse files Browse the repository at this point in the history
* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* ssl certification (#129)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* hotfix

* Deploy (#123)

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* Ssl certification (#125)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* Ssl certification (#126)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Ssl certification (#127)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Update aichallenge.sharif.edu

* added certs

* Ssl certification (#128)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* added certs

* Update docker-compose.yml

* added ssl tag to default server config

* changed all protocol schemes to https

* Fix test infra (#137)

* Deploy (#123)

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* Ssl certification (#125)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* Ssl certification (#126)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* Ssl certification (#127)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Update aichallenge.sharif.edu

* Ssl certification (#128)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* added certs

* Update docker-compose.yml

* added ssl tag to default server config

* changed all protocol schemes to https

* Deployment fixes (#134)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* added certs

* adding python 3.6 support

* Deployment fixes (#130)

* Deploy (#123)

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added ssl config for nginx

* Ssl certification (#125)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* Ssl certification (#126)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Ssl certification (#127)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Update aichallenge.sharif.edu

* added certs

* Ssl certification (#128)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* added certs

* Update docker-compose.yml

* added ssl tag to default server config

* changed all protocol schemes to https

* adding python 3.6 support

* adding python 3.6 support (2)

* Deployment fixes (#131)

* Deploy (#123)

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added ssl config for nginx

* Ssl certification (#125)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* Ssl certification (#126)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Ssl certification (#127)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Update aichallenge.sharif.edu

* added certs

* Ssl certification (#128)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* added certs

* Update docker-compose.yml

* added ssl tag to default server config

* changed all protocol schemes to https

* adding python 3.6 support

* adding python 3.6 support (2)

* adding python 3.6 support (3)

* Deployment fixes (#132)

* Deploy (#123)

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added ssl config for nginx

* Ssl certification (#125)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* Ssl certification (#126)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Ssl certification (#127)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Update aichallenge.sharif.edu

* added certs

* Ssl certification (#128)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* added certs

* Update docker-compose.yml

* added ssl tag to default server config

* changed all protocol schemes to https

* adding python 3.6 support

* adding python 3.6 support (2)

* adding python 3.6 support (3)

* added commented code for returning to python 3.5

* changed index page template from full-width to base to support sidebar in index page

* added topbar title page link

* added installation of python3-dev package

* fixed sidebar on the main page

* temporarily going back to python 3.5

* Fix schemaurl and url.

* Game (#135)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* .

* Add challenge league scoreboard

* rendering league changes done

* Remove request qrg

* translate words

* some changes in the logic

* template changes done

* migrations where deleted added again

* comment prints

* Deployment fixes (#138)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Deploy (#123)

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* Ssl certification (#125)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* Ssl certification (#126)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Ssl certification (#127)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Update aichallenge.sharif.edu

* added certs

* Ssl certification (#128)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* added certs

* Update docker-compose.yml

* added ssl tag to default server config

* changed all protocol schemes to https

* adding python 3.6 support

* Deployment fixes (#130)

* Deploy (#123)

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added ssl config for nginx

* Ssl certification (#125)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* Ssl certification (#126)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Ssl certification (#127)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Update aichallenge.sharif.edu

* added certs

* Ssl certification (#128)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* added certs

* Update docker-compose.yml

* added ssl tag to default server config

* changed all protocol schemes to https

* adding python 3.6 support

* adding python 3.6 support (2)

* Deployment fixes (#131)

* Deploy (#123)

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added ssl config for nginx

* Ssl certification (#125)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* Ssl certification (#126)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Ssl certification (#127)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Update aichallenge.sharif.edu

* added certs

* Ssl certification (#128)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* added certs

* Update docker-compose.yml

* added ssl tag to default server config

* changed all protocol schemes to https

* adding python 3.6 support

* adding python 3.6 support (2)

* adding python 3.6 support (3)

* Deployment fixes (#132)

* Deploy (#123)

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added ssl config for nginx

* Ssl certification (#125)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* Ssl certification (#126)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate production info for test website

* added ssl config for nginx

* added ssl config for nginx (2)

* added ssl config for nginx (3) removed port number from site address

* Ssl certification (#127)

* added counters

* Translate counters

* counter butification

* Decrease some padding

* Enhance.

* changed deployment server address

* changed nginx caching policy

* fixed cache problem with game files

* fixed caching issue (2)

* fixed caching issue (3)

* m

* hotfix

* Add export feature to profile (#120)

* Game (#119)

* submission is not set before running

* added action:run selected matches && match str bug fixed

* message error if one of selected matches is not ready or is done

* revert map save

* remove single_match done field

* action run selected matches completed and on run_matches in fuctions_test works fine

* match with bye teams done manually in double elimination and deleted in league

* custom list_filter for status and is_ready added

* match done manually

* test bug after deleting bye matches in league fixed

* functionality of create_new_league admin action fixed"

* model match is refactored and abstract get_match_result is implemented

* render friendly leauge

* friendly league scoreboard is tested and its ok enshaallah

* friednly league scoreboard is ready

* get rid of extra prints

* Fix minor issues (#122)

* added separate …
  • Loading branch information
altostratous authored Feb 20, 2018
1 parent 08747f1 commit 44121df
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 75 deletions.
3 changes: 2 additions & 1 deletion apps/game/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def run_selected_matches(self, request, queryset):
for match in matches:
from django.contrib import messages

if (not match.is_ready_to_run()):
if not match.is_ready_to_run():
messages.error(request, _('one of selected matches is not ready!'))
return

Expand All @@ -187,6 +187,7 @@ def run_selected_matches(self, request, queryset):
return

for match in matches:
match.ensure_submissions()
for single_match in match.single_matches.all():
single_matches.append(single_match)

Expand Down
40 changes: 32 additions & 8 deletions apps/game/models/competition.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def is_ready_to_run(self):
if self.depend is None:
return True
else:
if self. depend.__class__.__name__ == 'TeamParticipatesChallenge':
if self.depend.__class__.__name__ == 'TeamParticipatesChallenge':
return True
elif self.depend.__class__.__name__ == 'Match' and self.depend.status == 'done':
return True
Expand All @@ -373,6 +373,9 @@ def update_depend(self):
self.submission = func()
self.save()

def itself(self):
return self.submission


def get_log_file_directory(instance, filename):
return os.path.join('logs', filename + str(uuid.uuid4()))
Expand Down Expand Up @@ -431,6 +434,10 @@ def status(self):
status_result = 'running'
return status_result

def ensure_submissions(self):
self.part1.update_depend()
self.part2.update_depend()

def get_participant_or_team(self, part):
res = None
if part is None or part.object_id is None:
Expand All @@ -444,16 +451,16 @@ def get_participant_or_team(self, part):
res = part
return res

def get_team(self, participant_result): # participant_result = ['winner', 'loser'] <- depend_method
def get_team(self, participant_result): # participant_result = ['winner', 'loser'] <- depend_method
if self.status != 'done':
raise ValueError('Match is not done completely! why do yo call it ? :/')
if participant_result != 'winner' and participant_result != 'loser':
raise ValueError('input arg is wrong!')
if self.part1 is None or self.part2 is None:
raise ValueError('Participants can\'t be None')

part1_result = self.get_participant_result(self.part1) # winner or loser
part2_result = self.get_participant_result(self.part2) # winner or loser
part1_result = self.get_participant_result(self.part1) # winner or loser
part2_result = self.get_participant_result(self.part2) # winner or loser

if part1_result == participant_result:
return self.part1.get_team()
Expand Down Expand Up @@ -541,10 +548,9 @@ def get_result_color(self, result):
else:
return 'gray'



def is_ready_to_run(self):
return self.part1.is_ready_to_run() and self.part2.is_ready_to_run() and self.status != 'done' and len(self.single_matches.all()) > 0
return self.part1.is_ready_to_run() and self.part2.is_ready_to_run() and self.status != 'done' and len(
self.single_matches.all()) > 0

def get_depends(self):
"""
Expand Down Expand Up @@ -628,6 +634,7 @@ def score1(self):
def score2(self):
return self.get_score_for_participant(self.part2)


class Map(models.Model):
file = models.FileField(blank=False, null=False)
name = models.CharField(max_length=128, null=False, blank=False)
Expand Down Expand Up @@ -663,7 +670,6 @@ class SingleMatch(models.Model):
map = models.ForeignKey(Map)
status = models.CharField(max_length=128, choices=STATUS_CHOICES, default='waiting')


def __str__(self):
str_part1 = 'None'
if self.match.part1 is not None:
Expand Down Expand Up @@ -740,3 +746,21 @@ def done_single_match(self):
self.part1_score = 1
self.part2_score = 0
self.save()

def winner(self):
if self.status != 'done':
return None
if self.part1_score > self.part2_score:
return self.match.part1
else:
if self.part2_score > self.part1_score:
return self.match.part2
else:
return self.match.part2 if self.match.part1.submission.time > self.match.part2.submission.time else self.match.part1

def loser(self):
winner = self.winner()
if winner == self.match.part1:
return self.match.part2
else:
return self.match.part1
128 changes: 62 additions & 66 deletions apps/game/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.files import File
from django.db import connection
from django.http import HttpResponse
from django.http import HttpResponseBadRequest, HttpResponseServerError, JsonResponse
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.csrf import csrf_exempt

from apps.game import functions
from apps.game.models import Competition, TeamParticipatesChallenge, TeamSubmission, SingleMatch, Challenge
from apps.game.models import Competition, TeamParticipatesChallenge, TeamSubmission, SingleMatch, Challenge, Team

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -121,72 +122,67 @@ def render_league(request, competition_id):
})


def get_scoreboard_table(competition_id):
matches = list(Competition.objects.get(pk=int(competition_id)).matches.all())
def dictfetchall(cursor):
"Return all rows from a cursor as a dict"
columns = [col[0] for col in cursor.description]
return [
dict(zip(columns, row))
for row in cursor.fetchall()
]

# at the end league_teams is list of teams
league_teams = set()
league_scoreboard = []

for match in matches:
if match.part1.object_id is not None:
team1 = TeamParticipatesChallenge.objects.filter(
challenge=Competition.objects.get(pk=int(competition_id)).challenge,
pk=match.part1.object_id
)[0]

if team1 not in league_teams:
league_teams.add(team1)
if match.part2.object_id is not None:
team2 = TeamParticipatesChallenge.objects.filter(
challenge=Competition.objects.get(pk=int(competition_id)).challenge,
pk=match.part2.object_id
)[0]
if team2 not in league_teams:
league_teams.add(team2)

league_teams = list(league_teams)

for team in league_teams:
team_status = {}
team_status['team'] = team
team_status['score'] = 0
team_status['name'] = str(team.team)
team_status['total_num'] = 0
team_status['win_num'] = 0
team_status['lose_num'] = 0
league_scoreboard.append(team_status)

for match in matches:
match_result = match.get_match_result()
if match_result['part1']['result'] == 'notdone' or match_result['part1']['participant'] == \
match_result['part2']['participant']:
continue
participants = []
participants.append(match_result['part1'])
participants.append(match_result['part2'])
for part_dict in participants:
team = part_dict['participant']
if team.__class__.__name__ != 'TeamParticipatesChallenge':
raise ValueError('participant should be team!!!')
for team_status in league_scoreboard:
if team == team_status['team']:
team_status['score'] = team_status['score'] + part_dict['score']
team_status['total_num'] += 1
if part_dict['result'] == 'winner':
team_status['win_num'] += 1
elif part_dict['result'] == 'loser':
team_status['lose_num'] += 1

league_scoreboard = sorted(league_scoreboard, key=itemgetter('score'), reverse=True)
cnt = 1
for team_status in league_scoreboard:
team_status['rank'] = cnt
cnt += 1

# return [league_scoreboard, league_matches]

return league_scoreboard

def get_scoreboard_table(competition_id):
competition_single_matches = SingleMatch.objects.filter(match__competition_id=competition_id).prefetch_related(
'match').prefetch_related(
'match__part1__depend__team').prefetch_related(
'match__part2__depend__team').filter(status='done')

teams_status = {}
for single_match in competition_single_matches:

winner_participant = single_match.winner()
loser_participant = single_match.loser()

team = winner_participant.depend.team
if winner_participant.object_id not in teams_status:
teams_status[winner_participant.object_id] = {
'team': team,
'score': 0,
'name': team.name,
'total_num': 0,
'win_num': 0,
'lose_num': 0
}

team = loser_participant.depend.team
if loser_participant.object_id not in teams_status:
teams_status[loser_participant.depend.id] = {
'team': team,
'score': 0,
'name': team.name,
'total_num': 0,
'win_num': 0,
'lose_num': 0
}

if winner_participant.object_id != loser_participant.object_id:
teams_status[winner_participant.object_id]['score'] += single_match.get_score_for_participant(winner_participant)
teams_status[loser_participant.object_id]['score'] += single_match.get_score_for_participant(loser_participant)

teams_status[winner_participant.object_id]['win_num'] += 1
teams_status[winner_participant.object_id]['total_num'] += 1

teams_status[loser_participant.object_id]['lose_num'] += 1
teams_status[loser_participant.object_id]['total_num'] += 1

teams_status = [value for key, value in teams_status.items()]
teams_status = sorted(teams_status, key=itemgetter('score'), reverse=True)
count = 1
for team_status in teams_status:
team_status['rank'] = count
count += 1

return teams_status


@csrf_exempt
Expand Down

0 comments on commit 44121df

Please sign in to comment.