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
51cc7029
Kaydet (Commit)
51cc7029
authored
Mar 03, 2013
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #19464 -- Eased customization of ClearableFileInput's link markup
Thanks rubyruy for the report and the patch.
üst
03e40140
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
widgets.py
django/forms/widgets.py
+3
-1
No files found.
django/forms/widgets.py
Dosyayı görüntüle @
51cc7029
...
...
@@ -331,6 +331,8 @@ class ClearableFileInput(FileInput):
template_with_clear
=
'
%(clear)
s <label for="
%(clear_checkbox_id)
s">
%(clear_checkbox_label)
s</label>'
url_markup_template
=
'<a href="{0}">{1}</a>'
def
clear_checkbox_name
(
self
,
name
):
"""
Given the name of the file input, return the name of the clear checkbox
...
...
@@ -356,7 +358,7 @@ class ClearableFileInput(FileInput):
if
value
and
hasattr
(
value
,
"url"
):
template
=
self
.
template_with_initial
substitutions
[
'initial'
]
=
format_html
(
'<a href="{0}">{1}</a>'
,
substitutions
[
'initial'
]
=
format_html
(
self
.
url_markup_template
,
value
.
url
,
force_text
(
value
))
if
not
self
.
is_required
:
...
...
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