- 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.
20 lines
729 B
Python
20 lines
729 B
Python
from django.contrib import admin
|
|
from draft.models import DraftSession, DraftPick, DraftSessionSettings, DraftSessionParticipant
|
|
from boxofficefantasy.models import User
|
|
|
|
class DraftSessionSettingsInline(admin.TabularInline): # or TabularInline
|
|
model = DraftSessionSettings
|
|
can_delete = False
|
|
show_change_link = True
|
|
class DrafteSessionUserInline(admin.TabularInline):
|
|
extra = 0
|
|
model = DraftSessionParticipant
|
|
class DraftSessionAdmin(admin.ModelAdmin):
|
|
inlines = [DraftSessionSettingsInline, DrafteSessionUserInline]
|
|
readonly_fields = ('hashid',)
|
|
|
|
# Register your models here.
|
|
admin.site.register(DraftSession, DraftSessionAdmin)
|
|
admin.site.register(DraftSessionSettings)
|
|
admin.site.register(DraftPick)
|