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
73df1040
Kaydet (Commit)
73df1040
authored
Agu 11, 2015
tarafından
Tyson Clugg
Kaydeden (comit)
Markus Holtermann
Agu 31, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Cleaned up example migration files in docs
üst
e34226fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
migration-operations.txt
docs/ref/migration-operations.txt
+3
-1
migrations.txt
docs/topics/migrations.txt
+6
-2
No files found.
docs/ref/migration-operations.txt
Dosyayı görüntüle @
73df1040
...
...
@@ -280,7 +280,9 @@ example of using ``RunPython`` to create some initial objects on a ``Country``
model::
# -*- coding: utf-8 -*-
from django.db import models, migrations
from __future__ import unicode_literals
from django.db import migrations, models
def forwards_func(apps, schema_editor):
# We get the model from the versioned app registry;
...
...
docs/topics/migrations.txt
Dosyayı görüntüle @
73df1040
...
...
@@ -450,7 +450,9 @@ Then, open up the file; it should look something like this::
# -*- coding: utf-8 -*-
# Generated by Django A.B on YYYY-MM-DD HH:MM
from django.db import models, migrations
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
...
...
@@ -478,7 +480,9 @@ and realized that not everyone has first and last names). All we
need to do is use the historical model and iterate over the rows::
# -*- coding: utf-8 -*-
from django.db import models, migrations
from __future__ import unicode_literals
from django.db import migrations, models
def combine_names(apps, schema_editor):
# We can't import the Person model directly as it may be a newer
...
...
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