0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Setting for your most recent edits (#3483)

Closes #996
This commit is contained in:
Maarten Kling 2017-03-22 20:47:57 +01:00 committed by Rob Moorman
parent 9257a4a1dc
commit e41edb6e29
2 changed files with 11 additions and 1 deletions

View File

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

View File

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