<s> from __future__ import unicode_literals <EOL> from django . db import models <EOL> from django . utils . encoding import python_2_unicode_compatible <EOL> @ python_2_unicode_compatible <EOL> class Place ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> address = models . CharField ( max_length = <NUM_LIT> ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" % self . name <EOL> @ python_2_unicode_compatible <EOL> class Restaurant ( models . Model ) : <EOL> place = models . OneToOneField ( Place ) <EOL> serves_hot_dogs = models . BooleanField ( ) <EOL> serves_pizza = models . BooleanField ( ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" % self . place . name <EOL> @ python_2_unicode_compatible <EOL> class Bar ( models . Model ) : <EOL> place = models . OneToOneField ( Place ) <EOL> serves_cocktails = models . BooleanField ( ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" % self . place . name <EOL> class UndergroundBar ( models . Model ) : <EOL> place = models . OneToOneField ( Place , null = True ) <EOL> serves_cocktails = models . BooleanField ( ) <EOL> @ python_2_unicode_compatible <EOL> class Favorites ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> restaurants = models . ManyToManyField ( Restaurant ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" % self . name <EOL> class Target ( models . Model ) : <EOL> pass <EOL> class Pointer ( models . Model ) : <EOL> other = models . OneToOneField ( Target , primary_key = True ) <EOL> class Pointer2 ( models . Model ) : <EOL> other = models . OneToOneField ( Target ) </s>
