-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admin Changes + Allow for Downloading Uncompressed Logs (#89)
- Loading branch information
Showing
4 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
""" CombatLog admin """ | ||
"""CombatLog admin""" | ||
|
||
from django.contrib import admin | ||
from django.db.models import JSONField | ||
from django_json_widget.widgets import JSONEditorWidget | ||
|
||
from ladder.models import LadderEntry | ||
|
||
from .models import CombatLog, Metadata | ||
|
||
admin.site.register(CombatLog) | ||
|
||
class LadderEntryInline(admin.StackedInline): | ||
model = LadderEntry | ||
extra = 1 | ||
formfield_overrides = { | ||
JSONField: {"widget": JSONEditorWidget}, | ||
} | ||
|
||
|
||
@admin.register(Metadata) | ||
class MetadataAdmin(admin.ModelAdmin): | ||
formfield_overrides = { | ||
JSONField: {"widget": JSONEditorWidget}, | ||
} | ||
|
||
|
||
@admin.register(CombatLog) | ||
class CombatLogAdmin(admin.ModelAdmin): | ||
inlines = [LadderEntryInline] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters