<s> """<STR_LIT>""" <EOL> from django . db import models <EOL> class CommonInfo ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> age = models . PositiveIntegerField ( ) <EOL> class Meta : <EOL> abstract = True <EOL> ordering = [ '<STR_LIT:name>' ] <EOL> def __unicode__ ( self ) : <EOL> return u'<STR_LIT>' % ( self . __class__ . __name__ , self . name ) <EOL> class Worker ( CommonInfo ) : <EOL> job = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> class Student ( CommonInfo ) : <EOL> school_class = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> class Meta : <EOL> pass <EOL> class Post ( models . Model ) : <EOL> title = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> class Attachment ( models . Model ) : <EOL> post = models . ForeignKey ( Post , related_name = '<STR_LIT>' ) <EOL> content = models . TextField ( ) <EOL> class Meta : <EOL> abstract = True <EOL> def __unicode__ ( self ) : <EOL> return self . content <EOL> class Comment ( Attachment ) : <EOL> is_spam = models . BooleanField ( ) <EOL> class Link ( Attachment ) : <EOL> url = models . URLField ( ) <EOL> class Chef ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> def __unicode__ ( self ) : <EOL> return u"<STR_LIT>" % self . name <EOL> class Place ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> address = models . CharField ( max_length = <NUM_LIT> ) <EOL> def __unicode__ ( self ) : <EOL> return u"<STR_LIT>" % self . name <EOL> class Rating ( models . Model ) : <EOL> rating = models . IntegerField ( null = True , blank = True ) <EOL> class Meta : <EOL> abstract = True <EOL> ordering = [ '<STR_LIT>' ] <EOL> class Restaurant ( Place , Rating ) : <EOL> serves_hot_dogs = models . BooleanField ( ) <EOL> serves_pizza = models . BooleanField ( ) <EOL> chef = models . ForeignKey ( Chef , null = True , blank = True ) <EOL> class Meta ( Rating . Meta ) : <EOL> db_table = '<STR_LIT>' <EOL> def __unicode__ ( self ) : <EOL> return u"<STR_LIT>" % self . name <EOL> class ItalianRestaurant ( Restaurant ) : <EOL> serves_gnocchi = models . BooleanField ( ) <EOL> def __unicode__ ( self ) : <EOL> return u"<STR_LIT>" % self . name <EOL> class Supplier ( Place ) : <EOL> customers = models . ManyToManyField ( Restaurant , related_name = '<STR_LIT>' ) <EOL> def __unicode__ ( self ) : <EOL> return u"<STR_LIT>" % self . name <EOL> class ParkingLot ( Place ) : <EOL> parent = models . OneToOneField ( Place , primary_key = True , parent_link = True ) <EOL> main_site = models . ForeignKey ( Place , related_name = '<STR_LIT>' ) <EOL> def __unicode__ ( self ) : <EOL> return u"<STR_LIT>" % self . name <EOL> __test__ = { '<STR_LIT>' : """<STR_LIT>""" } </s>
