Update the admin interface to use the draft_title

pull/2127/merge
Mikalai Radchuk 2017-01-21 15:56:07 +03:00 zatwierdzone przez Karl Hobley
rodzic d5fa07dc4b
commit 59a9a9e87b
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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()

Wyświetl plik

@ -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'])