<s> from django . contrib import admin <EOL> from django . contrib . contenttypes import generic <EOL> from models import Candidate , CandidateList , Party <EOL> from links . models import Link <EOL> class MembershipInline ( admin . TabularInline ) : <EOL> model = CandidateList . candidates . through <EOL> extra = <NUM_LIT:1> <EOL> class LinksInline ( generic . GenericTabularInline ) : <EOL> model = Link <EOL> ct_fk_field = '<STR_LIT>' <EOL> extra = <NUM_LIT:1> <EOL> class CandidateListAdmin ( admin . ModelAdmin ) : <EOL> pass <EOL> admin . site . register ( CandidateList , CandidateListAdmin ) <EOL> class CandidateAdmin ( admin . ModelAdmin ) : <EOL> inlines = [ LinksInline , ] <EOL> admin . site . register ( Candidate , CandidateAdmin ) <EOL> class PartyAdmin ( admin . ModelAdmin ) : <EOL> pass <EOL> admin . site . register ( Party , PartyAdmin ) </s>
