from django.contrib import admin
from thing.models import APIKey, BlueprintInstance, Campaign, Character, CharacterConfig, Corporation

class APIKeyAdmin(admin.ModelAdmin):
    list_display = ('id', 'user', 'name', 'key_type', 'valid')

class BlueprintInstanceAdmin(admin.ModelAdmin):
    list_display = ('blueprint', 'original', 'material_level', 'productivity_level')

class CharacterAdmin(admin.ModelAdmin):
    fieldsets = [
        ('Character information', {
            'fields': ['name', 'corporation']
        }),
    ]
    
    list_display = ('id', 'name', 'corporation')

class CampaignAdmin(admin.ModelAdmin):
    prepopulated_fields = { 'slug': ( 'title', ) }

admin.site.register(APIKey, APIKeyAdmin)
admin.site.register(Character, CharacterAdmin)
admin.site.register(CharacterConfig)
admin.site.register(BlueprintInstance, BlueprintInstanceAdmin)
admin.site.register(Campaign, CampaignAdmin)
#admin.site.register(Corporation)

@@ -127,16 +127,99 @@
 poration
+, %5C%0A    Alliance, APIKeyFailure, Asset, AssetSummary, BlueprintComponent, Blueprint
 %0A%0Aclass 
@@ -751,16 +751,650 @@
 ', ) %7D%0A%0A
+class AllianceAdmin(admin.ModelAdmin):%0A    list_display = ('id', 'name', 'short_name')%0A%0Aclass APIKeyFailureAdmin(admin.ModelAdmin):%0A    list_display = ('user', 'keyid', 'fail_time')%0A%0Aclass AssetAdmin(admin.ModelAdmin):%0A    list_display = ('character', 'system', 'station', 'item', 'quantity')%0A%0Aclass AssetSummaryAdmin(admin.ModelAdmin):%0A    list_display = ('character', 'system', 'station', 'total_items', 'total_value')%0A%0Aclass BlueprintComponentAdmin(admin.ModelAdmin):%0A    list_display = ('blueprint', 'item', 'count', 'needs_waste')%0A%0Aclass BlueprintAdmin(admin.ModelAdmin):%0A    list_display = ('name', 'item', 'production_time')%0A%0A%0A
 admin.si
@@ -1622,9 +1622,8 @@
 in)%0A
-#
 admi
@@ -1651,8 +1651,312 @@
 ration)%0A
+admin.site.register(Alliance, AllianceAdmin)%0Aadmin.site.register(APIKeyFailure, APIKeyFailureAdmin)%0Aadmin.site.register(Asset, AssetAdmin)%0Aadmin.site.register(AssetSummary, AssetSummaryAdmin)%0Aadmin.site.register(BlueprintComponent, BlueprintComponentAdmin)%0Aadmin.site.register(Blueprint, BlueprintAdmin)%0A

Add all the models to the admin view for easier debug/management