mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #25465 -- Restored line breaks conversion in admin readonly fields.
This commit is contained in:
parent
dbb0df2a0e
commit
69208a5a1c
6 changed files with 28 additions and 3 deletions
|
@ -387,7 +387,7 @@ class LinkInline(admin.TabularInline):
|
|||
model = Link
|
||||
extra = 1
|
||||
|
||||
readonly_fields = ("posted", "multiline")
|
||||
readonly_fields = ("posted", "multiline", "readonly_link_content")
|
||||
|
||||
def multiline(self, instance):
|
||||
return "InlineMultiline\ntest\nstring"
|
||||
|
@ -435,7 +435,7 @@ class PostAdmin(admin.ModelAdmin):
|
|||
readonly_fields = (
|
||||
'posted', 'awesomeness_level', 'coolness', 'value',
|
||||
'multiline', 'multiline_html', lambda obj: "foo",
|
||||
'multiline_html_allow_tags',
|
||||
'multiline_html_allow_tags', 'readonly_content',
|
||||
)
|
||||
|
||||
inlines = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue