comparison mysite/band/admin.py @ 5:e602b5302b94

Added support for countries beside the USA.
author Brian Neal <bgneal@gmail.com>
date Thu, 14 May 2009 00:31:39 +0000
parents 0dcfcdf50c62
children 25e00d1b99bf
comparison
equal deleted inserted replaced
4:432f7467543a 5:e602b5302b94
10 from mysite.band.models import Album 10 from mysite.band.models import Album
11 from mysite.band.models import Album_Merchant 11 from mysite.band.models import Album_Merchant
12 from mysite.band.models import Album_Track 12 from mysite.band.models import Album_Track
13 from mysite.band.models import Band 13 from mysite.band.models import Band
14 from mysite.band.models import City 14 from mysite.band.models import City
15 from mysite.band.models import Country
15 from mysite.band.models import Fan 16 from mysite.band.models import Fan
16 from mysite.band.models import Gear 17 from mysite.band.models import Gear
17 from mysite.band.models import Gig 18 from mysite.band.models import Gig
18 from mysite.band.models import Label_Release 19 from mysite.band.models import Label_Release
19 from mysite.band.models import Member 20 from mysite.band.models import Member
68 69
69 class CityInline(admin.TabularInline): 70 class CityInline(admin.TabularInline):
70 model = City 71 model = City
71 72
72 class CityAdmin(admin.ModelAdmin): 73 class CityAdmin(admin.ModelAdmin):
73 list_display = ('name', 'state') 74 list_display = ('name', 'state', 'country')
74 list_filter = ('state', ) 75 list_filter = ('state', )
75 search_fields = ('name', ) 76 search_fields = ('name', )
76 77
77 admin.site.register(City, CityAdmin) 78 admin.site.register(City, CityAdmin)
79
80 #######################################################################
81
82 admin.site.register(Country)
78 83
79 ####################################################################### 84 #######################################################################
80 85
81 class StateAdmin(admin.ModelAdmin): 86 class StateAdmin(admin.ModelAdmin):
82 inlines = [ 87 inlines = [