consolidated player-table
to consolidate, had to move the filtering to the context instead of the template (probably the right way to do it anyway) also switched from using display to using class to hide cells (also probably the more right/consistent way to do this)
This commit is contained in:
@@ -102,7 +102,13 @@ def edit_lineup(request, event_id):
|
||||
f.availability = f.instance.member.availability_set.get(event_id=event_id)
|
||||
# f.statline = f.instance.member.statline_set.get()
|
||||
|
||||
formset_lineup = [f for f in formset if f.instance.sequence]
|
||||
formset_bench = [f for f in formset if f not in formset_lineup]
|
||||
formset_dhd = [f for f in formset if not f.instance.sequence and f.instance.label]
|
||||
|
||||
return render(request, 'teamsnap/lineup.html', {'title': 'Lineup',
|
||||
'event': event,
|
||||
'formset': formset,
|
||||
'formset_lineup': formset_lineup,
|
||||
'formset_bench':formset_bench,
|
||||
'formset_dhd':formset_dhd
|
||||
})
|
||||
Reference in New Issue
Block a user