Fix orientation parameter handling and template URL endpoints

- Add orientation parameter support to create_group and edit_group functions
- Fix manage_group.html template URL endpoint from 'update_group_content_order' to 'update_group_content_order_route'
- Add orientation field and filtering to edit_group.html template with JavaScript functionality
- Update group_player_management.py to handle orientation validation in create and edit operations
- Fix docker-compose.yml to include build directive and correct volume paths
- Update entrypoint.sh to handle fresh deployments without migrations
- Ensure orientation consistency across group and player management

These changes resolve:
- Internal Server Error on manage_group page
- Missing orientation parameter in group creation/editing
- Template URL endpoint mismatches
- Docker deployment issues with fresh installations
This commit is contained in:
2025-08-01 15:15:59 -04:00
parent 70d76f45e7
commit 318f783de3
7 changed files with 76 additions and 18 deletions

6
app.py
View File

@@ -488,7 +488,8 @@ def create_group():
if request.method == 'POST':
group_name = request.form['name']
player_ids = request.form.getlist('players')
create_group_util(group_name, player_ids)
orientation = request.form.get('orientation', 'Landscape')
create_group_util(group_name, player_ids, orientation)
flash(f'Group "{group_name}" created successfully.', 'success')
return redirect(url_for('dashboard'))
players = Player.query.all()
@@ -514,7 +515,8 @@ def edit_group(group_id):
if request.method == 'POST':
name = request.form['name']
player_ids = request.form.getlist('players')
edit_group_util(group_id, name, player_ids)
orientation = request.form.get('orientation', group.orientation)
edit_group_util(group_id, name, player_ids, orientation)
flash(f'Group "{name}" updated successfully.', 'success')
return redirect(url_for('dashboard'))
players = Player.query.all()