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
057305e5
Kaydet (Commit)
057305e5
authored
Ara 30, 2014
tarafından
Markus Holtermann
Kaydeden (comit)
Claude Paroz
Ock 02, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added ignore_swappable to StateApps
Refs #23745.
üst
a159b1fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
autodetector.py
django/db/migrations/autodetector.py
+1
-1
state.py
django/db/migrations/state.py
+6
-1
No files found.
django/db/migrations/autodetector.py
Dosyayı görüntüle @
057305e5
...
...
@@ -108,7 +108,7 @@ class MigrationAutodetector(object):
# Prepare some old/new state and model lists, separating
# proxy models and ignoring unmigrated apps.
self
.
old_apps
=
self
.
from_state
.
apps
self
.
old_apps
=
self
.
from_state
.
concrete_
apps
self
.
new_apps
=
self
.
to_state
.
apps
self
.
old_model_keys
=
[]
self
.
old_proxy_keys
=
[]
...
...
django/db/migrations/state.py
Dosyayı görüntüle @
057305e5
...
...
@@ -44,6 +44,11 @@ class ProjectState(object):
def
apps
(
self
):
return
StateApps
(
self
.
real_apps
,
self
.
models
)
@property
def
concrete_apps
(
self
):
self
.
apps
=
StateApps
(
self
.
real_apps
,
self
.
models
,
ignore_swappable
=
True
)
return
self
.
apps
@classmethod
def
from_apps
(
cls
,
apps
):
"Takes in an Apps and returns a ProjectState matching it"
...
...
@@ -87,7 +92,7 @@ class StateApps(Apps):
Subclass of the global Apps registry class to better handle dynamic model
additions and removals.
"""
def
__init__
(
self
,
real_apps
,
models
):
def
__init__
(
self
,
real_apps
,
models
,
ignore_swappable
=
False
):
# Any apps in self.real_apps should have all their models included
# in the render. We don't use the original model instances as there
# are some variables that refer to the Apps object.
...
...
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