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
e7c6a2cf
Kaydet (Commit)
e7c6a2cf
authored
Tem 04, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #4960 -- Fixed selenium test failures for CharField strip changes.
üst
85569780
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
admin.py
tests/admin_views/admin.py
+3
-0
views.py
tests/forms_tests/views.py
+10
-1
No files found.
tests/admin_views/admin.py
Dosyayı görüntüle @
e7c6a2cf
...
@@ -15,6 +15,7 @@ from django.contrib.auth.models import Group, User
...
@@ -15,6 +15,7 @@ from django.contrib.auth.models import Group, User
from
django.core.exceptions
import
ValidationError
from
django.core.exceptions
import
ValidationError
from
django.core.files.storage
import
FileSystemStorage
from
django.core.files.storage
import
FileSystemStorage
from
django.core.mail
import
EmailMessage
from
django.core.mail
import
EmailMessage
from
django.db
import
models
from
django.forms.models
import
BaseModelFormSet
from
django.forms.models
import
BaseModelFormSet
from
django.http
import
HttpResponse
,
StreamingHttpResponse
from
django.http
import
HttpResponse
,
StreamingHttpResponse
from
django.utils.safestring
import
mark_safe
from
django.utils.safestring
import
mark_safe
...
@@ -654,6 +655,7 @@ class RelatedPrepopulatedInline1(admin.StackedInline):
...
@@ -654,6 +655,7 @@ class RelatedPrepopulatedInline1(admin.StackedInline):
'fields'
:
((
'pubdate'
,
'status'
),
(
'name'
,
'slug1'
,
'slug2'
,),)
'fields'
:
((
'pubdate'
,
'status'
),
(
'name'
,
'slug1'
,
'slug2'
,),)
}),
}),
)
)
formfield_overrides
=
{
models
.
CharField
:
{
'strip'
:
False
}}
model
=
RelatedPrepopulated
model
=
RelatedPrepopulated
extra
=
1
extra
=
1
prepopulated_fields
=
{
'slug1'
:
[
'name'
,
'pubdate'
],
prepopulated_fields
=
{
'slug1'
:
[
'name'
,
'pubdate'
],
...
@@ -674,6 +676,7 @@ class MainPrepopulatedAdmin(admin.ModelAdmin):
...
@@ -674,6 +676,7 @@ class MainPrepopulatedAdmin(admin.ModelAdmin):
'fields'
:
((
'pubdate'
,
'status'
),
(
'name'
,
'slug1'
,
'slug2'
,),)
'fields'
:
((
'pubdate'
,
'status'
),
(
'name'
,
'slug1'
,
'slug2'
,),)
}),
}),
)
)
formfield_overrides
=
{
models
.
CharField
:
{
'strip'
:
False
}}
prepopulated_fields
=
{
'slug1'
:
[
'name'
,
'pubdate'
],
prepopulated_fields
=
{
'slug1'
:
[
'name'
,
'pubdate'
],
'slug2'
:
[
'status'
,
'name'
]}
'slug2'
:
[
'status'
,
'name'
]}
...
...
tests/forms_tests/views.py
Dosyayı görüntüle @
e7c6a2cf
from
django
import
forms
from
django.views.generic.edit
import
UpdateView
from
django.views.generic.edit
import
UpdateView
from
.models
import
Article
from
.models
import
Article
class
ArticleForm
(
forms
.
ModelForm
):
content
=
forms
.
CharField
(
strip
=
False
,
widget
=
forms
.
Textarea
)
class
Meta
:
model
=
Article
fields
=
'__all__'
class
ArticleFormView
(
UpdateView
):
class
ArticleFormView
(
UpdateView
):
model
=
Article
model
=
Article
success_url
=
'/'
success_url
=
'/'
f
ields
=
'__all__'
f
orm_class
=
ArticleForm
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