<s> """<STR_LIT>""" <EOL> from django . db import models <EOL> class PersonManager ( models . Manager ) : <EOL> def get_fun_people ( self ) : <EOL> return self . filter ( fun = True ) <EOL> class Person ( models . Model ) : <EOL> first_name = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> last_name = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> fun = models . BooleanField ( ) <EOL> objects = PersonManager ( ) <EOL> def __unicode__ ( self ) : <EOL> return u"<STR_LIT>" % ( self . first_name , self . last_name ) <EOL> class PublishedBookManager ( models . Manager ) : <EOL> def get_query_set ( self ) : <EOL> return super ( PublishedBookManager , self ) . get_query_set ( ) . filter ( is_published = True ) <EOL> class Book ( models . Model ) : <EOL> title = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> author = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> is_published = models . BooleanField ( ) <EOL> published_objects = PublishedBookManager ( ) <EOL> authors = models . ManyToManyField ( Person , related_name = '<STR_LIT>' ) <EOL> def __unicode__ ( self ) : <EOL> return self . title <EOL> class FastCarManager ( models . Manager ) : <EOL> def get_query_set ( self ) : <EOL> return super ( FastCarManager , self ) . get_query_set ( ) . filter ( top_speed__gt = <NUM_LIT> ) <EOL> class Car ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> mileage = models . IntegerField ( ) <EOL> top_speed = models . IntegerField ( help_text = "<STR_LIT>" ) <EOL> cars = models . Manager ( ) <EOL> fast_cars = FastCarManager ( ) <EOL> def __unicode__ ( self ) : <EOL> return self . name <EOL> __test__ = { '<STR_LIT>' : """<STR_LIT>""" } </s>
