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
27ee608b
Kaydet (Commit)
27ee608b
authored
Tem 01, 2014
tarafından
Colin Wood
Kaydeden (comit)
Tim Graham
Tem 02, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22940 -- Added missing string iterpolation parameters in migrations.writer error.
Forwardport of
f5740af8
from stable/1.7.x
üst
7c3d6149
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
AUTHORS
AUTHORS
+1
-0
writer.py
django/db/migrations/writer.py
+1
-1
test_writer.py
tests/migrations/test_writer.py
+13
-0
No files found.
AUTHORS
Dosyayı görüntüle @
27ee608b
...
...
@@ -684,6 +684,7 @@ answer newbie questions, and generally made Django that much better:
Jakub Wiśniowski <restless.being@gmail.com>
Maciej Wiśniowski <pigletto@gmail.com>
wojtek
Colin Wood <cwood06@gmail.com>
Marcin Wróbel
Jason Yan <tailofthesun@gmail.com>
Lars Yencken <lars.yencken@gmail.com>
...
...
django/db/migrations/writer.py
Dosyayı görüntüle @
27ee608b
...
...
@@ -319,7 +319,7 @@ class MigrationWriter(object):
"and used in the same class body). Please move the "
"function into the main module body to use migrations.
\n
"
"For more information, see https://docs.djangoproject.com/en/1.7/topics/migrations/#serializing-values"
)
%
(
value
.
__name__
,
module_name
)
)
return
"
%
s.
%
s"
%
(
module_name
,
value
.
__name__
),
set
([
"import
%
s"
%
module_name
])
# Classes
elif
isinstance
(
value
,
type
):
...
...
tests/migrations/test_writer.py
Dosyayı görüntüle @
27ee608b
...
...
@@ -167,6 +167,19 @@ class WriterTests(TestCase):
with
self
.
assertRaises
(
ValueError
):
self
.
serialize_round_trip
(
TestModel2
.
thing
)
def
test_serialize_local_function_reference_message
(
self
):
"""
Make sure user is seeing which module/function is the issue
"""
class
TestModel2
(
object
):
def
upload_to
(
self
):
return
"somewhere dynamic"
thing
=
models
.
FileField
(
upload_to
=
upload_to
)
with
six
.
assertRaisesRegex
(
self
,
ValueError
,
'^Could not find function upload_to in migrations.test_writer'
):
self
.
serialize_round_trip
(
TestModel2
.
thing
)
def
test_simple_migration
(
self
):
"""
Tests serializing a simple migration.
...
...
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