<s> """<STR_LIT>""" <EOL> from __future__ import unicode_literals <EOL> from django . db import models <EOL> from django . utils . encoding import python_2_unicode_compatible <EOL> class First ( models . Model ) : <EOL> second = models . IntegerField ( ) <EOL> class Second ( models . Model ) : <EOL> first = models . ForeignKey ( First , related_name = '<STR_LIT>' ) <EOL> class Third ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> third = models . ForeignKey ( '<STR_LIT>' , null = True , related_name = '<STR_LIT>' ) <EOL> class Parent ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> bestchild = models . ForeignKey ( '<STR_LIT>' , null = True , related_name = '<STR_LIT>' ) <EOL> class Child ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> parent = models . ForeignKey ( Parent ) <EOL> @ python_2_unicode_compatible <EOL> class Category ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class Record ( models . Model ) : <EOL> category = models . ForeignKey ( Category ) <EOL> @ python_2_unicode_compatible <EOL> class Relation ( models . Model ) : <EOL> left = models . ForeignKey ( Record , related_name = '<STR_LIT>' ) <EOL> right = models . ForeignKey ( Record , related_name = '<STR_LIT>' ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" % ( self . left . category . name , self . right . category . name ) <EOL> class Car ( models . Model ) : <EOL> make = models . CharField ( max_length = <NUM_LIT:100> , null = True , unique = True ) <EOL> class Driver ( models . Model ) : <EOL> car = models . ForeignKey ( Car , to_field = '<STR_LIT>' , null = True , related_name = '<STR_LIT>' ) </s>
