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
6b39010d
Kaydet (Commit)
6b39010d
authored
Tem 26, 2013
tarafından
Andrew Godwin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove nasty error message checking hack
üst
88e1e6f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
migrate.py
django/core/management/commands/migrate.py
+2
-14
No files found.
django/core/management/commands/migrate.py
Dosyayı görüntüle @
6b39010d
...
@@ -12,6 +12,7 @@ from django.db.migrations.executor import MigrationExecutor
...
@@ -12,6 +12,7 @@ from django.db.migrations.executor import MigrationExecutor
from
django.db.migrations.loader
import
AmbiguityError
from
django.db.migrations.loader
import
AmbiguityError
from
django.utils.datastructures
import
SortedDict
from
django.utils.datastructures
import
SortedDict
from
django.utils.importlib
import
import_module
from
django.utils.importlib
import
import_module
from
django.utils.module_loading
import
module_has_submodule
,
import_by_path
class
Command
(
BaseCommand
):
class
Command
(
BaseCommand
):
...
@@ -40,21 +41,8 @@ class Command(BaseCommand):
...
@@ -40,21 +41,8 @@ class Command(BaseCommand):
# Import the 'management' module within each installed app, to register
# Import the 'management' module within each installed app, to register
# dispatcher events.
# dispatcher events.
for
app_name
in
settings
.
INSTALLED_APPS
:
for
app_name
in
settings
.
INSTALLED_APPS
:
try
:
if
module_has_submodule
(
import_module
(
app_name
),
"management"
)
:
import_module
(
'.management'
,
app_name
)
import_module
(
'.management'
,
app_name
)
except
ImportError
as
exc
:
# This is slightly hackish. We want to ignore ImportErrors
# if the "management" module itself is missing -- but we don't
# want to ignore the exception if the management module exists
# but raises an ImportError for some reason. The only way we
# can do this is to check the text of the exception. Note that
# we're a bit broad in how we check the text, because different
# Python implementations may not use the same text.
# CPython uses the text "No module named management"
# PyPy uses "No module named myproject.myapp.management"
msg
=
exc
.
args
[
0
]
if
not
msg
.
startswith
(
'No module named'
)
or
'management'
not
in
msg
:
raise
# Get the database we're operating from
# Get the database we're operating from
db
=
options
.
get
(
'database'
)
db
=
options
.
get
(
'database'
)
...
...
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