<s> from django . contrib . gis . db import models <EOL> from django . contrib . localflavor . us . models import USStateField <EOL> from django . utils . encoding import python_2_unicode_compatible <EOL> @ python_2_unicode_compatible <EOL> class Location ( models . Model ) : <EOL> point = models . PointField ( ) <EOL> objects = models . GeoManager ( ) <EOL> def __str__ ( self ) : return self . point . wkt <EOL> @ python_2_unicode_compatible <EOL> class City ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> state = USStateField ( ) <EOL> location = models . ForeignKey ( Location ) <EOL> objects = models . GeoManager ( ) <EOL> def __str__ ( self ) : return self . name <EOL> class AugmentedLocation ( Location ) : <EOL> extra_text = models . TextField ( blank = True ) <EOL> objects = models . GeoManager ( ) <EOL> class DirectoryEntry ( models . Model ) : <EOL> listing_text = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> location = models . ForeignKey ( AugmentedLocation ) <EOL> objects = models . GeoManager ( ) <EOL> @ python_2_unicode_compatible <EOL> class Parcel ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> city = models . ForeignKey ( City ) <EOL> center1 = models . PointField ( ) <EOL> center2 = models . PointField ( srid = <NUM_LIT> , db_column = '<STR_LIT>' ) <EOL> border1 = models . PolygonField ( ) <EOL> border2 = models . PolygonField ( srid = <NUM_LIT> ) <EOL> objects = models . GeoManager ( ) <EOL> def __str__ ( self ) : return self . name <EOL> class Author ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> dob = models . DateField ( ) <EOL> objects = models . GeoManager ( ) <EOL> class Article ( models . Model ) : <EOL> title = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> author = models . ForeignKey ( Author , unique = True ) <EOL> objects = models . GeoManager ( ) <EOL> class Book ( models . Model ) : <EOL> title = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> author = models . ForeignKey ( Author , related_name = '<STR_LIT>' , null = True ) <EOL> objects = models . GeoManager ( ) </s>
