mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
parent
9257a4a1dc
commit
e41edb6e29
@ -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
|
||||
------
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user