Browse Source

change game.state references to game.get_state

testing
Burathar 4 years ago
parent
commit
c735463f95
  1. 2
      app/main/routes.py
  2. 2
      app/templates/_game_player_info.html
  3. 2
      app/templates/game_owner_dashboard.html
  4. 2
      app/templates/index.html

2
app/main/routes.py

@ -64,7 +64,7 @@ def change_game_settings(game_name): @@ -64,7 +64,7 @@ def change_game_settings(game_name):
form.old_name = game.name
if request.method == 'GET':
form.state.default = game.state.value
form.state.default = game.get_state().value
# pylint: disable=no-member
form.process()
form.game_name.data = game.name

2
app/templates/_game_player_info.html

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
</tr>
<tr>
<th>Game State</th>
<td>{{ game.state.name.title() }}</td>
<td>{{ game.get_state().name.title() }}</td>
</tr>
<tr>
<th>Start Time</th>

2
app/templates/game_owner_dashboard.html

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
<br><br>
<p><b>Start Time: </b>{% if game.start_time %}{{ moment(game.start_time).format('DD-MM-YYYY, HH:mm') }}{% else %}None{% endif %}</p>
<p><b>End Time: </b>{% if game.end_time %}{{ moment(game.end_time).format('DD-MM-YYYY, HH:mm') }}{% else %}None{% endif %}</p>
<p><b>State: </b>{{ game.state.name.title() }}</p>
<p><b>State: </b>{{ game.get_state().name.title() }}</p>
<h2>Players:</h2>
<p><a href="{{ url_for('main.add_player', game_name = game.name) }}">Add player</a></p>
<div class="table-responsive">

2
app/templates/index.html

@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
{% for game in current_user.games %}
<tr>
<td><a href="{{ url_for('main.game_dashboard', game_name = game.name) }}">{{ game.name }}</a></td>
<td>{{ game.state.name.title() }}</td>
<td>{{ game.get_state().name.title() }}</td>
<td>{{ game.start_time }}</td>
<td>{{ game.end_time }}</td>
<td>

Loading…
Cancel
Save