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
11750276
Kaydet (Commit)
11750276
authored
Agu 20, 2015
tarafından
Jeremy Satterfield
Kaydeden (comit)
Tim Graham
Agu 26, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #25308 -- Made MigrationQuestioner respect MIGRATION_MODULES setting.
üst
91ec1841
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
questioner.py
django/db/migrations/questioner.py
+2
-2
test_commands.py
tests/migrations/test_commands.py
+10
-0
No files found.
django/db/migrations/questioner.py
Dosyayı görüntüle @
11750276
...
...
@@ -9,7 +9,7 @@ from django.db.models.fields import NOT_PROVIDED
from
django.utils
import
datetime_safe
,
six
,
timezone
from
django.utils.six.moves
import
input
from
.loader
import
M
IGRATIONS_MODULE_NAME
from
.loader
import
M
igrationLoader
class
MigrationQuestioner
(
object
):
...
...
@@ -37,7 +37,7 @@ class MigrationQuestioner(object):
app_config
=
apps
.
get_app_config
(
app_label
)
except
LookupError
:
# It's a fake app.
return
self
.
defaults
.
get
(
"ask_initial"
,
False
)
migrations_import_path
=
"
%
s.
%
s"
%
(
app_config
.
name
,
MIGRATIONS_MODULE_NAME
)
migrations_import_path
=
MigrationLoader
.
migrations_module
(
app_config
.
label
)
try
:
migrations_module
=
importlib
.
import_module
(
migrations_import_path
)
except
ImportError
:
...
...
tests/migrations/test_commands.py
Dosyayı görüntüle @
11750276
...
...
@@ -610,6 +610,16 @@ class MakeMigrationsTests(MigrationTestBase):
call_command
(
"makemigrations"
,
"migrations"
,
stdout
=
out
)
self
.
assertIn
(
"No changes detected in app 'migrations'"
,
out
.
getvalue
())
def
test_makemigrations_no_apps_initial
(
self
):
"""
makemigrations should detect initial is needed on empty migration
modules if no app provided.
"""
out
=
six
.
StringIO
()
with
self
.
temporary_migration_module
(
module
=
"migrations.test_migrations_empty"
):
call_command
(
"makemigrations"
,
stdout
=
out
)
self
.
assertIn
(
"0001_initial.py"
,
out
.
getvalue
())
def
test_makemigrations_migrations_announce
(
self
):
"""
Makes sure that makemigrations announces the migration at the default verbosity level.
...
...
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