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
f44dbf74
Kaydet (Commit)
f44dbf74
authored
Tem 25, 2014
tarafından
Andrew Godwin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Mark initial_data as deprecated separately from syncdb. Refs #23077.
üst
ed481269
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
loaddata.py
django/core/management/commands/loaddata.py
+6
-0
deprecation.txt
docs/internals/deprecation.txt
+4
-4
1.7.txt
docs/releases/1.7.txt
+3
-0
No files found.
django/core/management/commands/loaddata.py
Dosyayı görüntüle @
f44dbf74
...
...
@@ -17,6 +17,7 @@ from django.utils import lru_cache
from
django.utils.encoding
import
force_text
from
django.utils.functional
import
cached_property
from
django.utils._os
import
upath
from
django.utils.deprecation
import
RemovedInDjango19Warning
from
itertools
import
product
try
:
...
...
@@ -219,6 +220,11 @@ class Command(BaseCommand):
if
fixture_name
!=
'initial_data'
and
not
fixture_files
:
# Warning kept for backwards-compatibility; why not an exception?
warnings
.
warn
(
"No fixture named '
%
s' found."
%
fixture_name
)
elif
fixture_name
==
'initial_data'
:
warnings
.
warn
(
'initial_data fixtures are deprecated. Use data migrations instead.'
,
RemovedInDjango19Warning
)
return
fixture_files
...
...
docs/internals/deprecation.txt
Dosyayı görüntüle @
f44dbf74
...
...
@@ -28,10 +28,6 @@ about each item can often be found in the release notes of two versions prior.
* The ``DatabaseCreation`` class on each database backend will be removed,
and all table/schema editing will be moved to be via ``SchemaEditor`` instead.
* The legacy method of syncing apps without migrations will be removed,
and migrations will become compulsory for all apps. This includes automatic
loading of fixtures and support for initial SQL data.
* The ability to :func:`~django.core.urlresolvers.reverse` URLs using a dotted
Python path will be removed.
...
...
@@ -68,6 +64,10 @@ details on these changes.
* ``allow_syncdb`` on database routers will no longer automatically become
``allow_migrate``.
* The legacy method of syncing apps without migrations will be removed,
and migrations will become compulsory for all apps. This includes automatic
loading of ``initial_data`` fixtures and support for initial SQL data.
* All models will need to be defined inside an installed application or
declare an explicit :attr:`~django.db.models.Options.app_label`.
Furthermore, it won't be possible to import them before their application
...
...
docs/releases/1.7.txt
Dosyayı görüntüle @
f44dbf74
...
...
@@ -961,6 +961,9 @@ Instead, you are encouraged to load initial data in migrations if you need it
this has the added advantage that your initial data will not need updating
every time you change the schema.
Additionally, like the rest of Django's old ``syncdb`` code, ``initial_data``
has been started down the deprecation path and will be removed in Django 1.9.
deconstruct() and serializability
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
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