<s> from django . db import models <EOL> class Author ( models . Model ) : <EOL> first_name = models . CharField ( max_length = <NUM_LIT:255> ) <EOL> last_name = models . CharField ( max_length = <NUM_LIT:255> ) <EOL> dob = models . DateField ( ) <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( Author , self ) . __init__ ( * args , ** kwargs ) <EOL> for k in kwargs : <EOL> assert k in [ f . attname for f in self . _meta . fields ] , "<STR_LIT>" % k <EOL> class Book ( models . Model ) : <EOL> title = models . CharField ( max_length = <NUM_LIT:255> ) <EOL> author = models . ForeignKey ( Author ) <EOL> paperback = models . BooleanField ( ) <EOL> opening_line = models . TextField ( ) <EOL> class Coffee ( models . Model ) : <EOL> brand = models . CharField ( max_length = <NUM_LIT:255> , db_column = "<STR_LIT:name>" ) <EOL> class Reviewer ( models . Model ) : <EOL> reviewed = models . ManyToManyField ( Book ) <EOL> class FriendlyAuthor ( Author ) : <EOL> pass </s>
