1
0
mirror of https://github.com/django/django.git synced 2025-05-10 00:46:28 +00:00
Claude Paroz a7d964ab87 Replaced no_spatialite by connection features
Refs #22632. Thanks Tim Graham for the review.
2014-08-23 15:41:13 +02:00

23 lines
916 B
Python

from django.db.backends.mysql.base import (
DatabaseWrapper as MySQLDatabaseWrapper,
DatabaseFeatures as MySQLDatabaseFeatures,
)
from django.contrib.gis.db.backends.base import BaseSpatialFeatures
from django.contrib.gis.db.backends.mysql.creation import MySQLCreation
from django.contrib.gis.db.backends.mysql.introspection import MySQLIntrospection
from django.contrib.gis.db.backends.mysql.operations import MySQLOperations
class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures):
has_spatialrefsys_table = False
supports_num_points_poly = False
class DatabaseWrapper(MySQLDatabaseWrapper):
def __init__(self, *args, **kwargs):
super(DatabaseWrapper, self).__init__(*args, **kwargs)
self.features = DatabaseFeatures(self)
self.creation = MySQLCreation(self)
self.ops = MySQLOperations(self)
self.introspection = MySQLIntrospection(self)