<s> from django . db import models <EOL> from django . contrib import admin <EOL> from django . contrib . contenttypes import generic <EOL> from django . contrib . contenttypes . models import ContentType <EOL> class Episode ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> class Media ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> content_type = models . ForeignKey ( ContentType ) <EOL> object_id = models . PositiveIntegerField ( ) <EOL> content_object = generic . GenericForeignKey ( ) <EOL> url = models . URLField ( verify_exists = False ) <EOL> def __unicode__ ( self ) : <EOL> return self . url <EOL> class MediaInline ( generic . GenericTabularInline ) : <EOL> model = Media <EOL> extra = <NUM_LIT:1> <EOL> class EpisodeAdmin ( admin . ModelAdmin ) : <EOL> inlines = [ <EOL> MediaInline , <EOL> ] <EOL> admin . site . register ( Episode , EpisodeAdmin ) </s>
