mirror of
https://github.com/django/django.git
synced 2024-12-23 09:36:06 +00:00
6b6d13bf6e
Refs #23879.
19 lines
622 B
Python
19 lines
622 B
Python
from django.core.exceptions import ImproperlyConfigured
|
|
|
|
try:
|
|
from django.contrib.gis.db import models
|
|
except ImproperlyConfigured:
|
|
from django.db import models
|
|
|
|
class DummyField(models.Field):
|
|
def __init__(self, dim=None, srid=None, geography=None, *args, **kwargs):
|
|
super(DummyField, self).__init__(*args, **kwargs)
|
|
|
|
models.GeoManager = models.Manager
|
|
models.GeometryField = DummyField
|
|
models.LineStringField = DummyField
|
|
models.MultiPointField = DummyField
|
|
models.MultiPolygonField = DummyField
|
|
models.PointField = DummyField
|
|
models.PolygonField = DummyField
|