       auth_srid: This keyword may be customized with the value of the
                  `auth_srid` field.  Defaults to the SRID determined
                  by GDAL.
  
       ref_sys_name: For SpatiaLite users only, sets the value of the
                     the `ref_sys_name` field.  Defaults to the name
                     determined by GDAL.
      """
      from django.contrib.gis.db.backend import SpatialBackend
      from django.contrib.gis.models import SpatialRefSys
      from django.contrib.gis.gdal import SpatialReference
  
      if SpatialBackend.oracle or SpatialBackend.mysql:
          raise Exception('This utility not supported on Oracle or MySQL spatial backends.')
  
      if not isinstance(srs, SpatialReference):
 
</s> remove      auth_srid: This keyword may be customized with the value of the
                `auth_srid` field.  Defaults to the SRID determined
                by GDAL.
 </s> add      auth_srid:
       This keyword may be customized with the value of the `auth_srid` field.
       Defaults to the SRID determined by GDAL. </s> remove     if SpatialBackend.oracle or SpatialBackend.mysql:
        raise Exception('This utility not supported on Oracle or MySQL spatial backends.')
 </s> add      database:
      The name of the database connection to use; the default is the value
      of `django.db.DEFAULT_DB_ALIAS` (at the time of this writing, it's value
      is 'default').
    """
    connection = connections[database]
    if not hasattr(connection.ops, 'spatial_version'):
        raise Exception('The `add_srs_entry` utility only works '
                        'with spatial backends.')
    if connection.ops.oracle or connection.ops.mysql:
        raise Exception('This utility does not support the '
                        'Oracle or MySQL spatial backends.')
    SpatialRefSys = connection.ops.spatial_ref_sys() </s> remove      auth_name: This keyword may be customized with the value of the
                `auth_name` field.  Defaults to 'EPSG'.
 </s> add      auth_name:
       This keyword may be customized with the value of the `auth_name` field.
       Defaults to 'EPSG'. </s> remove     >>> add_postgis_srs(SpatialReference(900913))
 </s> add     >>> from django.contrib.gis.utils import add_srs_entry
    >>> add_srs_entry(900913)
     ref_sys_name:
       For SpatiaLite users only, sets the value of the the `ref_sys_name` field.
       Defaults to the name determined by GDAL.
       auth_srid: This keyword may be customized with the value of the
                  `auth_srid` field.  Defaults to the SRID determined
                  by GDAL.
  
     ref_sys_name:
       For SpatiaLite users only, sets the value of the the `ref_sys_name` field.
       Defaults to the name determined by GDAL.
     ref_sys_name:
       For SpatiaLite users only, sets the value of the the `ref_sys_name` field.
       Defaults to the name determined by GDAL.
     ref_sys_name:
       For SpatiaLite users only, sets the value of the the `ref_sys_name` field.
       Defaults to the name determined by GDAL.
     ref_sys_name:
       For SpatiaLite users only, sets the value of the the `ref_sys_name` field.
       Defaults to the name determined by GDAL.
     ref_sys_name:
       For SpatiaLite users only, sets the value of the the `ref_sys_name` field.
       Defaults to the name determined by GDAL.
     ref_sys_name:
       For SpatiaLite users only, sets the value of the the `ref_sys_name` field.
       Defaults to the name determined by GDAL.
     ref_sys_name:
       For SpatiaLite users only, sets the value of the the `ref_sys_name` field.
       Defaults to the name determined by GDAL.
  
      if SpatialBackend.oracle or SpatialBackend.mysql:
          raise Exception('This utility not supported on Oracle or MySQL spatial backends.')
  
      if not isinstance(srs, SpatialReference):
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Fixed #12591 -- Renamed `add_postgis_srs` to `add_srs_entry` (keeping backwards-compatible alias), added `database` keyword for multi-db, removed deprecated `SpatialBackend` references; no longer use `get_or_create` and look for existing entry based on SRID value. 


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12228 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/contrib/gis/utils/srs.py