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
828f7b62
Kaydet (Commit)
828f7b62
authored
Tem 10, 2012
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #18602 -- Improved error message when database NAME is missing
Thanks Kristian Glass for the report.
üst
d9db1d33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
base.py
django/db/backends/postgresql_psycopg2/base.py
+4
-2
base.py
django/db/backends/sqlite3/base.py
+3
-1
No files found.
django/db/backends/postgresql_psycopg2/base.py
Dosyayı görüntüle @
828f7b62
...
...
@@ -157,9 +157,11 @@ class DatabaseWrapper(BaseDatabaseWrapper):
def
_cursor
(
self
):
settings_dict
=
self
.
settings_dict
if
self
.
connection
is
None
:
if
settings_dict
[
'NAME'
]
==
''
:
if
not
settings_dict
[
'NAME'
]
:
from
django.core.exceptions
import
ImproperlyConfigured
raise
ImproperlyConfigured
(
"You need to specify NAME in your Django settings file."
)
raise
ImproperlyConfigured
(
"settings.DATABASES is improperly configured. "
"Please supply the NAME value."
)
conn_params
=
{
'database'
:
settings_dict
[
'NAME'
],
}
...
...
django/db/backends/sqlite3/base.py
Dosyayı görüntüle @
828f7b62
...
...
@@ -250,7 +250,9 @@ class DatabaseWrapper(BaseDatabaseWrapper):
settings_dict
=
self
.
settings_dict
if
not
settings_dict
[
'NAME'
]:
from
django.core.exceptions
import
ImproperlyConfigured
raise
ImproperlyConfigured
(
"Please fill out the database NAME in the settings module before using the database."
)
raise
ImproperlyConfigured
(
"settings.DATABASES is improperly configured. "
"Please supply the NAME value."
)
kwargs
=
{
'database'
:
settings_dict
[
'NAME'
],
'detect_types'
:
Database
.
PARSE_DECLTYPES
|
Database
.
PARSE_COLNAMES
,
...
...
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