<s> from django . contrib . gis . db import models <EOL> from django . contrib . gis . tests . utils import mysql , spatialite <EOL> null_flag = not mysql <EOL> class Country ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> mpoly = models . MultiPolygonField ( ) <EOL> objects = models . GeoManager ( ) <EOL> def __unicode__ ( self ) : return self . name <EOL> class City ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> point = models . PointField ( ) <EOL> objects = models . GeoManager ( ) <EOL> def __unicode__ ( self ) : return self . name <EOL> class PennsylvaniaCity ( City ) : <EOL> county = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> founded = models . DateTimeField ( null = True ) <EOL> objects = models . GeoManager ( ) <EOL> class State ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> poly = models . PolygonField ( null = null_flag ) <EOL> objects = models . GeoManager ( ) <EOL> def __unicode__ ( self ) : return self . name <EOL> class Track ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> line = models . LineStringField ( ) <EOL> objects = models . GeoManager ( ) <EOL> def __unicode__ ( self ) : return self . name <EOL> class Truth ( models . Model ) : <EOL> val = models . BooleanField ( ) <EOL> objects = models . GeoManager ( ) <EOL> if not spatialite : <EOL> class Feature ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> geom = models . GeometryField ( ) <EOL> objects = models . GeoManager ( ) <EOL> def __unicode__ ( self ) : return self . name <EOL> class MinusOneSRID ( models . Model ) : <EOL> geom = models . PointField ( srid = - <NUM_LIT:1> ) <EOL> objects = models . GeoManager ( ) </s>
