Skip to content

Commit d846f82

Browse files
authored
Add 'Python 3.X.YaN' placeholder for release name (#2819)
1 parent a2b0d2d commit d846f82

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

downloads/admin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ class ReleaseAdmin(ContentManageableModelAdmin):
2525
list_filter = ['version', 'is_published', 'show_on_download_page']
2626
search_fields = ['name', 'slug']
2727
ordering = ['-release_date']
28+
29+
def formfield_for_dbfield(self, db_field, request, **kwargs):
30+
field = super().formfield_for_dbfield(db_field, request, **kwargs)
31+
if db_field.name == "name":
32+
field.widget.attrs["placeholder"] = "Python 3.X.YaN"
33+
return field

0 commit comments

Comments
 (0)