from django.contrib import admin from django.contrib.auth.models import User from models import * ''' #class NicknameInline(admin.StackedInline): # model = Nickname # extra = 3 #class LinkInlineModelAdmin(admin.InlineModelAdmin): # pass #class LinkInline(LinkInlineModelAdmin): # model = Link # extra = 3 class ProfileInline(admin.StackedInline): model = Person extra = 1 class PerformanceAdmin(admin.ModelAdmin): filter_horizontal = ('links', 'images') class EventAdmin(admin.ModelAdmin): filter_horizontal = ('links',) class ProfileAdmin(admin.ModelAdmin): filter_horizontal = ('links', 'files', 'images',) # inlines = [NicknameInline] # inlines = [LinkInline] class VenueAdmin(admin.ModelAdmin): ordering = ('name',) prepopulated_fields = {'slug': ('name',)} filter_horizontal = ('links', 'images') class TheatreGroupAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('name',)} filter_horizontal = ('links', 'files', 'images') class ProductionAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} filter_horizontal = ('links', 'files', 'images',) inlines = [ProfileInline] class ScriptAdmin(admin.ModelAdmin): filter_horizontal = ('links', 'downloads') #admin.site.register(Nickname3) #admin.site.register(Nickname2) admin.site.register(Performance, PerformanceAdmin) admin.site.register(Event, EventAdmin) admin.site.register(Location) admin.site.register(ProfileProfile) admin.site.register(ProfileGroup) admin.site.register(Script, ScriptAdmin) admin.site.register(Production, ProductionAdmin) admin.site.register(Image) admin.site.register(File) admin.site.register(Link) admin.site.register(RandomQuote) admin.site.register(ProfileProduction) admin.site.register(Nickname) admin.site.register(TheatreGroup, TheatreGroupAdmin) admin.site.register(Venue, VenueAdmin) admin.site.register(Profile, ProfileAdmin) '''