kopia lustrzana https://github.com/wagtail/wagtail
Update the admin interface to use the draft_title
rodzic
d5fa07dc4b
commit
59a9a9e87b
|
@ -670,7 +670,7 @@ class Page(six.with_metaclass(PageBase, AbstractPage, index.Indexed, Clusterable
|
|||
"""
|
||||
Return the title for this page as it should appear in the admin backend.
|
||||
"""
|
||||
return self.title
|
||||
return self.draft_title
|
||||
|
||||
def save_revision(self, user=None, submitted_for_moderation=False, approved_go_live_at=None, changed=True):
|
||||
self.full_clean()
|
||||
|
|
|
@ -88,7 +88,7 @@ class TestValidation(TestCase):
|
|||
|
||||
def test_get_admin_display_title(self):
|
||||
homepage = Page.objects.get(url_path='/home/')
|
||||
self.assertEqual(homepage.title, homepage.get_admin_display_title())
|
||||
self.assertEqual(homepage.draft_title, homepage.get_admin_display_title())
|
||||
|
||||
|
||||
@override_settings(ALLOWED_HOSTS=['localhost', 'events.example.com', 'about.example.com', 'unknown.site.com'])
|
||||
|
|
Ładowanie…
Reference in New Issue