Setting for your most recent edits (#3483)

Closes #996
pull/3349/merge
Maarten Kling 2017-03-22 20:47:57 +01:00 zatwierdzone przez Rob Moorman
rodzic 9257a4a1dc
commit e41edb6e29
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -230,6 +230,16 @@ To use Embedly, you must also install their Python module:
$ pip install embedly
Dashboard
---------
.. code-block:: python
WAGTAILADMIN_RECENT_EDITS_LIMIT = 5
This setting lets you change the number of items shown at 'Your most recent edits' on the dashboard.
Images
------

Wyświetl plik

@ -56,7 +56,7 @@ class RecentEditsPanel(object):
SELECT max(created_at) AS max_created_at, page_id FROM
wagtailcore_pagerevision WHERE user_id = %s GROUP BY page_id ORDER BY max_created_at DESC LIMIT %s
) AS max_rev ON max_rev.max_created_at = wp.created_at ORDER BY wp.created_at DESC
""", [self.request.user.pk, 5])
""", [self.request.user.pk, getattr(settings, 'WAGTAILADMIN_RECENT_EDITS_LIMIT', 5)])
last_edits = list(last_edits)
page_keys = [pr.page.pk for pr in last_edits]
specific_pages = Page.objects.filter(pk__in=page_keys).specific()