Integrate draft session support with phase handling and real-time updates
- Added user authentication UI in the base template for navbar. - Expanded `league.dj.html` to include a new "Draft Sessions" tab showing active drafts. - Refactored Django views and models to support `DraftSession` with participants and movies. - Replaced deprecated models like `DraftParticipant` and `DraftMoviePool` with a new schema using `DraftSessionParticipant`. - Introduced WebSocket consumers (`DraftAdminConsumer`, `DraftParticipantConsumer`) with structured phase logic and caching. - Added `DraftStateManager` for managing draft state in Django cache. - Created frontend UI components in React for draft admin and participants, including phase control and WebSocket message logging. - Updated SCSS styles for improved UI structure and messaging area.
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-02 00:47
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boxofficefantasy', '0009_alter_moviemetric_value_alter_pick_bid_amount_and_more'),
|
||||
('draft', '0005_remove_draftsession_settings_and_more'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='draftparticipant',
|
||||
name='draft',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='draftparticipant',
|
||||
name='user',
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='draftsessionsettings',
|
||||
options={'verbose_name_plural': 'Draft session settings'},
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='draftsession',
|
||||
name='current_nomination_index',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='draftsession',
|
||||
name='is_active',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='draftsession',
|
||||
name='movies',
|
||||
field=models.ManyToManyField(related_name='draft_sessions', to='boxofficefantasy.movie'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DraftSessionParticipant',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('draft_session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='draft.draftsession')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('draft_session', 'user')},
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='draftsession',
|
||||
name='participants',
|
||||
field=models.ManyToManyField(related_name='participant_entries', through='draft.DraftSessionParticipant', to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='DraftMoviePool',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='DraftParticipant',
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user