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
7e714827
Kaydet (Commit)
7e714827
authored
Kas 09, 2013
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't initialize PostGIS-specific stuff for non-db connections
Refs #16969.
üst
3c10d1e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
base.py
django/contrib/gis/db/backends/postgis/base.py
+5
-3
creation.py
django/db/backends/creation.py
+2
-1
No files found.
django/contrib/gis/db/backends/postgis/base.py
Dosyayı görüntüle @
7e714827
from
django.db.backends.creation
import
NO_DB_ALIAS
from
django.db.backends.postgresql_psycopg2.base
import
DatabaseWrapper
as
Psycopg2DatabaseWrapper
from
django.contrib.gis.db.backends.postgis.creation
import
PostGISCreation
from
django.contrib.gis.db.backends.postgis.introspection
import
PostGISIntrospection
...
...
@@ -7,6 +8,7 @@ from django.contrib.gis.db.backends.postgis.operations import PostGISOperations
class
DatabaseWrapper
(
Psycopg2DatabaseWrapper
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
DatabaseWrapper
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
creation
=
PostGISCreation
(
self
)
self
.
ops
=
PostGISOperations
(
self
)
self
.
introspection
=
PostGISIntrospection
(
self
)
if
kwargs
.
get
(
'alias'
,
''
)
!=
NO_DB_ALIAS
:
self
.
creation
=
PostGISCreation
(
self
)
self
.
ops
=
PostGISOperations
(
self
)
self
.
introspection
=
PostGISIntrospection
(
self
)
django/db/backends/creation.py
Dosyayı görüntüle @
7e714827
...
...
@@ -14,6 +14,7 @@ from .utils import truncate_name
# The prefix to put on the default database name when creating
# the test database.
TEST_DATABASE_PREFIX
=
'test_'
NO_DB_ALIAS
=
'__no_db__'
class
BaseDatabaseCreation
(
object
):
...
...
@@ -44,7 +45,7 @@ class BaseDatabaseCreation(object):
backend
=
load_backend
(
settings_dict
[
'ENGINE'
])
nodb_connection
=
backend
.
DatabaseWrapper
(
settings_dict
,
alias
=
'__no_db__'
,
alias
=
NO_DB_ALIAS
,
allow_thread_sharing
=
False
)
return
nodb_connection
...
...
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