-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split admin.py into multiple files and improve search
Add ' + ' as a separator for multiple requirements Closes #79
- Loading branch information
Showing
10 changed files
with
369 additions
and
337 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .card_admin import CardAdmin | ||
from .template_admin import TemplateAdmin | ||
from .feature_admin import FeatureAdmin | ||
from .combo_admin import ComboAdmin | ||
from .variant_admin import VariantAdmin | ||
from .job_admin import JobAdmin | ||
from .log_admin import LogEntryAdmin | ||
|
||
from django.contrib import admin | ||
admin.site.site_header = 'Spellbook Admin Panel' | ||
admin.site.site_title = 'Spellbook Admin' | ||
admin.site.index_title = 'Spellbook Admin Index' |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.contrib import admin | ||
from ..models import Card | ||
|
||
|
||
@admin.register(Card) | ||
class CardAdmin(admin.ModelAdmin): | ||
fieldsets = [ | ||
('Spellbook', {'fields': ['name', 'features']}), | ||
('Scryfall', {'fields': ['oracle_id', 'identity', 'legal']}), | ||
] | ||
# inlines = [FeatureInline] | ||
list_filter = ['identity', 'legal'] | ||
search_fields = ['name', 'features__name'] | ||
autocomplete_fields = ['features'] | ||
list_display = ['name', 'identity', 'id'] |
Oops, something went wrong.