title: How to make a geography field unique?
body: <p>I have this model:</p>
  
  <pre><code>class Marker(models.Model):
      location = models.PointField(geography=True, unique=True)
  </code></pre>
  
  <p>When I try to add a Marker instance through the admin interface, it raises a <code>ValueError</code>:</p>
  
  <pre><code>File "django/core/handlers/base.py" in get_response
    111. response = callback(request, *callback_args, **callback_kwargs)
  File "django/contrib/admin/options.py" in wrapper
    366. return self.admin_site.admin_view(view)(*args, **kwargs)
  File "django/utils/decorators.py" in _wrapped_view
    91. response = view_func(request, *args, **kwargs)
  File "django/views/decorators/cache.py" in _wrapped_view_func
    89. response = view_func(request, *args, **kwargs)
  File "django/contrib/admin/sites.py" in inner
    196. return view(request, *args, **kwargs)
  File "django/utils/decorators.py" in _wrapper
    25. return bound_func(*args, **kwargs)
  File "django/utils/decorators.py" in _wrapped_view
    91. response = view_func(request, *args, **kwargs)
  File "django/utils/decorators.py" in bound_func
    21. return func(self, *args2, **kwargs2)
  File "django/db/transaction.py" in inner
    209. return func(*args, **kwargs)
  File "django/contrib/admin/options.py" in add_view
    937. if form.is_valid():
  File "django/forms/forms.py" in is_valid
    124. return self.is_bound and not bool(self.errors)
  File "django/forms/forms.py" in _get_errors
    115. self.full_clean()
  File "django/forms/forms.py" in full_clean
    272. self._post_clean()
  File "django/forms/models.py" in _post_clean
    338. self.validate_unique()
  File "django/forms/models.py" in validate_unique
    347. self.instance.validate_unique(exclude=exclude)
  File "django/db/models/base.py" in validate_unique
    633. errors = self._perform_unique_checks(unique_checks)
  File "django/db/models/base.py" in _perform_unique_checks
    724. if qs.exists():
  File "django/db/models/query.py" in exists
    565. return self.query.has_results(using=self.db)
  File "django/db/models/sql/query.py" in has_results
    441. return bool(compiler.execute_sql(SINGLE))
  File "django/db/models/sql/compiler.py" in execute_sql
    808. sql, params = self.as_sql()
  File "django/db/models/sql/compiler.py" in as_sql
    82. where, w_params = self.query.where.as_sql(qn=qn, connection=self.connection)
  File "django/db/models/sql/where.py" in as_sql
    91. sql, params = child.as_sql(qn=qn, connection=connection)
  File "django/db/models/sql/where.py" in as_sql
    94. sql, params = self.make_atom(child, qn, connection)
  File "django/contrib/gis/db/models/sql/where.py" in make_atom
    47. spatial_sql = connection.ops.spatial_lookup_sql(data, lookup_type, params_or_value, lvalue.field, qn)
  File "django/contrib/gis/db/backends/postgis/operations.py" in spatial_lookup_sql
    497. '"%s" lookup.' % lookup_type)
  
  Exception Type: ValueError at /admin/coremap/marker/add/
  Exception Value: PostGIS geography does not support the "exact" lookup.
  </code></pre>
  
  <p>According to <a href="https://docs.djangoproject.com/en/1.4/ref/contrib/gis/model-api/#geography-type" rel="nofollow">this</a>, a <code>geography</code> type really doesn't have the <code>exact</code> field lookup. There is any way to accomplish the <code>unique</code> constraint without use <code>exact</code>?</p>
  
  <p>I'm using:</p>
  
  <ul>
  <li>Postgresql 9.1</li>
  <li>PostGIS 1.5</li>
  <li>Django 1.4.3</li>
  </ul>