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):
form.old_name = game.name form.old_name = game.name
if request.method == 'GET': if request.method == 'GET':
form.state.default = game.state.value form.state.default = game.get_state().value
# pylint: disable=no-member # pylint: disable=no-member
form.process() form.process()
form.game_name.data = game.name form.game_name.data = game.name

2
app/templates/_game_player_info.html

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

2
app/templates/game_owner_dashboard.html

@ -21,7 +21,7 @@
<br><br> <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>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>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> <h2>Players:</h2>
<p><a href="{{ url_for('main.add_player', game_name = game.name) }}">Add player</a></p> <p><a href="{{ url_for('main.add_player', game_name = game.name) }}">Add player</a></p>
<div class="table-responsive"> <div class="table-responsive">

2
app/templates/index.html

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

Loading…
Cancel
Save