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
b5511ddd
Kaydet (Commit)
b5511ddd
authored
Ock 16, 2017
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Ock 16, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved unneeded ImproperlyConfigured inner imports.
üst
1df89a60
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
7 deletions
+4
-7
__init__.py
django/contrib/gis/utils/__init__.py
+1
-1
base.py
django/db/backends/mysql/base.py
+1
-2
base.py
django/db/backends/oracle/base.py
+1
-2
base.py
django/db/backends/sqlite3/base.py
+1
-2
No files found.
django/contrib/gis/utils/__init__.py
Dosyayı görüntüle @
b5511ddd
...
...
@@ -3,12 +3,12 @@
"""
from
django.contrib.gis.gdal
import
HAS_GDAL
from
django.contrib.gis.utils.wkt
import
precision_wkt
# NOQA
from
django.core.exceptions
import
ImproperlyConfigured
if
HAS_GDAL
:
from
django.contrib.gis.utils.ogrinfo
import
ogrinfo
# NOQA
from
django.contrib.gis.utils.ogrinspect
import
mapping
,
ogrinspect
# NOQA
from
django.contrib.gis.utils.srs
import
add_srs_entry
# NOQA
from
django.core.exceptions
import
ImproperlyConfigured
try
:
# LayerMapping requires DJANGO_SETTINGS_MODULE to be set,
# so this needs to be in try/except.
...
...
django/db/backends/mysql/base.py
Dosyayı görüntüle @
b5511ddd
...
...
@@ -12,6 +12,7 @@ import sys
import
warnings
from
django.conf
import
settings
from
django.core.exceptions
import
ImproperlyConfigured
from
django.db
import
utils
from
django.db.backends
import
utils
as
backend_utils
from
django.db.backends.base.base
import
BaseDatabaseWrapper
...
...
@@ -24,7 +25,6 @@ from django.utils.safestring import SafeBytes, SafeText
try
:
import
MySQLdb
as
Database
except
ImportError
as
e
:
from
django.core.exceptions
import
ImproperlyConfigured
raise
ImproperlyConfigured
(
'Error loading MySQLdb module:
%
s.
\n
'
'Did you install mysqlclient or MySQL-python?'
%
e
...
...
@@ -48,7 +48,6 @@ from .validation import DatabaseValidation # isort:skip
version
=
Database
.
version_info
if
(
version
<
(
1
,
2
,
1
)
or
(
version
[:
3
]
==
(
1
,
2
,
1
)
and
(
len
(
version
)
<
5
or
version
[
3
]
!=
'final'
or
version
[
4
]
<
2
))):
from
django.core.exceptions
import
ImproperlyConfigured
raise
ImproperlyConfigured
(
"MySQLdb-1.2.1p2 or newer is required; you have
%
s"
%
Database
.
__version__
)
...
...
django/db/backends/oracle/base.py
Dosyayı görüntüle @
b5511ddd
...
...
@@ -13,6 +13,7 @@ import sys
import
warnings
from
django.conf
import
settings
from
django.core.exceptions
import
ImproperlyConfigured
from
django.db
import
utils
from
django.db.backends.base.base
import
BaseDatabaseWrapper
from
django.utils
import
six
,
timezone
...
...
@@ -28,7 +29,6 @@ def _setup_environment(environ):
try
:
import
ctypes
except
ImportError
as
e
:
from
django.core.exceptions
import
ImproperlyConfigured
raise
ImproperlyConfigured
(
"Error loading ctypes:
%
s; "
"the Oracle backend requires ctypes to "
"operate correctly under Cygwin."
%
e
)
...
...
@@ -51,7 +51,6 @@ _setup_environment([
try
:
import
cx_Oracle
as
Database
except
ImportError
as
e
:
from
django.core.exceptions
import
ImproperlyConfigured
raise
ImproperlyConfigured
(
"Error loading cx_Oracle module:
%
s"
%
e
)
# Some of these import cx_Oracle, so import them after checking if it's installed.
...
...
django/db/backends/sqlite3/base.py
Dosyayı görüntüle @
b5511ddd
...
...
@@ -14,6 +14,7 @@ import warnings
import
pytz
from
django.conf
import
settings
from
django.core.exceptions
import
ImproperlyConfigured
from
django.db
import
utils
from
django.db.backends
import
utils
as
backend_utils
from
django.db.backends.base.base
import
BaseDatabaseWrapper
...
...
@@ -31,7 +32,6 @@ try:
except
ImportError
:
from
sqlite3
import
dbapi2
as
Database
except
ImportError
as
exc
:
from
django.core.exceptions
import
ImproperlyConfigured
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.
...
...
@@ -167,7 +167,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
def
get_connection_params
(
self
):
settings_dict
=
self
.
settings_dict
if
not
settings_dict
[
'NAME'
]:
from
django.core.exceptions
import
ImproperlyConfigured
raise
ImproperlyConfigured
(
"settings.DATABASES is improperly configured. "
"Please supply the NAME value."
)
...
...
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