Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
1b06d5e6
Kaydet (Commit)
1b06d5e6
authored
Ock 20, 2017
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #23919 -- Removed pysqlite support (it's Python 2 only).
üst
289fc1bf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
37 deletions
+9
-37
base.py
django/contrib/gis/db/backends/spatialite/base.py
+4
-9
base.py
django/db/backends/sqlite3/base.py
+2
-13
index.txt
docs/ref/contrib/gis/install/index.txt
+3
-3
databases.txt
docs/ref/databases.txt
+0
-12
No files found.
django/contrib/gis/db/backends/spatialite/base.py
Dosyayı görüntüle @
1b06d5e6
...
...
@@ -4,7 +4,7 @@ from ctypes.util import find_library
from
django.conf
import
settings
from
django.core.exceptions
import
ImproperlyConfigured
from
django.db.backends.sqlite3.base
import
(
Database
,
Database
Wrapper
as
SQLiteDatabaseWrapper
,
SQLiteCursorWrapper
,
DatabaseWrapper
as
SQLiteDatabaseWrapper
,
SQLiteCursorWrapper
,
)
from
django.utils
import
six
...
...
@@ -24,11 +24,6 @@ class DatabaseWrapper(SQLiteDatabaseWrapper):
ops_class
=
SpatiaLiteOperations
def
__init__
(
self
,
*
args
,
**
kwargs
):
# Before we get too far, make sure pysqlite 2.5+ is installed.
if
Database
.
version_info
<
(
2
,
5
,
0
):
raise
ImproperlyConfigured
(
'Only versions of pysqlite 2.5+ are '
'compatible with SpatiaLite and GeoDjango.'
)
# Trying to find the location of the SpatiaLite library.
# Here we are figuring out the path to the SpatiaLite library
# (`libspatialite`). If it's not in the system library path (e.g., it
...
...
@@ -50,9 +45,9 @@ class DatabaseWrapper(SQLiteDatabaseWrapper):
conn
.
enable_load_extension
(
True
)
except
AttributeError
:
raise
ImproperlyConfigured
(
'
The pysqlite library does not support C extension loading.
'
'
Both SQLite and pysqlite must be configured to allow
'
'the loading of extensions to use SpatiaLite.'
)
'
SpatiaLite requires SQLite to be configured to allow
'
'
extension loading.
'
)
# Loading the SpatiaLite library extension on the connection, and returning
# the created cursor.
cur
=
conn
.
cursor
(
factory
=
SQLiteCursorWrapper
)
...
...
django/db/backends/sqlite3/base.py
Dosyayı görüntüle @
1b06d5e6
"""
SQLite3 backend for django.
Works with either the pysqlite2 module or the sqlite3 module in the
standard library.
SQLite3 backend for the sqlite3 module in the standard library.
"""
import
decimal
import
re
import
warnings
from
sqlite3
import
dbapi2
as
Database
import
pytz
...
...
@@ -20,15 +18,6 @@ from django.utils.dateparse import (
)
from
django.utils.encoding
import
force_text
try
:
try
:
from
pysqlite2
import
dbapi2
as
Database
except
ImportError
:
from
sqlite3
import
dbapi2
as
Database
except
ImportError
as
exc
:
raise
ImproperlyConfigured
(
"Error loading either pysqlite2 or sqlite3 modules (tried in that order):
%
s"
%
exc
)
# Some of these import sqlite3, so import them after checking if it's installed.
from
.client
import
DatabaseClient
# isort:skip
from
.creation
import
DatabaseCreation
# isort:skip
from
.features
import
DatabaseFeatures
# isort:skip
...
...
docs/ref/contrib/gis/install/index.txt
Dosyayı görüntüle @
1b06d5e6
...
...
@@ -61,7 +61,7 @@ Database Library Requirements Supported Versions Notes
PostgreSQL GEOS, GDAL, PROJ.4, PostGIS 9.3+ Requires PostGIS.
MySQL GEOS, GDAL 5.5+ Not OGC-compliant; :ref:`limited functionality <mysql-spatial-limitations>`.
Oracle GEOS, GDAL 11.2+ XE not supported.
SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.6.+ Requires SpatiaLite 4.0+
, pysqlite2 2.5+
SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.6.+ Requires SpatiaLite 4.0+
================== ============================== ================== =========================================
See also `this comparison matrix`__ on the OSGeo Wiki for
...
...
@@ -268,8 +268,8 @@ KyngChaos packages
William Kyngesburye provides a number of `geospatial library binary packages`__
that make it simple to get GeoDjango installed on OS X without compiling
them from source. However, the `Apple Developer Tools`_ are still necessary
for compiling the Python database adapters :ref:`psycopg2_kyngchaos` (for
PostGIS)
and `pysqlite2 <https://pypi.python.org/pypi/pysqlite>`_ (for SpatiaLite
).
for compiling the Python database adapters :ref:`psycopg2_kyngchaos` (for
PostGIS
).
.. note::
...
...
docs/ref/databases.txt
Dosyayı görüntüle @
1b06d5e6
...
...
@@ -663,18 +663,6 @@ substring filtering.
.. _documented at sqlite.org: https://www.sqlite.org/faq.html#q18
.. _using-newer-versions-of-pysqlite:
Using newer versions of the SQLite DB-API 2.0 driver
----------------------------------------------------
Django will use a ``pysqlite2`` module in preference to ``sqlite3`` as shipped
with the Python standard library if it finds one is available.
This provides the ability to upgrade both the DB-API 2.0 interface or SQLite 3
itself to versions newer than the ones included with your particular Python
binary distribution, if needed.
"Database is locked" errors
---------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment