2010-09-23 18:32:51 +00:00
|
|
|
from mtgweb.analyzer.models import *
|
2010-09-16 15:28:31 +00:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2010-09-23 18:32:51 +00:00
|
|
|
class IncludedInline(admin.TabularInline):
|
|
|
|
model = Included
|
|
|
|
extra = 1
|
2010-09-16 15:28:31 +00:00
|
|
|
class CardAdmin(admin.ModelAdmin):
|
2010-09-23 18:32:51 +00:00
|
|
|
inlines = (IncludedInline,)
|
2010-09-16 15:28:31 +00:00
|
|
|
search_fields = ['name']
|
|
|
|
list_filter = ['type']
|
2010-09-23 18:32:51 +00:00
|
|
|
class DeckAdmin(admin.ModelAdmin):
|
|
|
|
inlines = (IncludedInline,)
|
2010-09-16 15:28:31 +00:00
|
|
|
|
|
|
|
admin.site.register(Card, CardAdmin)
|
2010-09-23 18:32:51 +00:00
|
|
|
admin.site.register(Deck, DeckAdmin)
|
2010-09-16 18:11:55 +00:00
|
|
|
admin.site.register(CardType)
|