kopia lustrzana https://github.com/wagtail/wagtail
rodzic
9257a4a1dc
commit
e41edb6e29
|
@ -230,6 +230,16 @@ To use Embedly, you must also install their Python module:
|
||||||
$ pip install embedly
|
$ 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
|
Images
|
||||||
------
|
------
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ class RecentEditsPanel(object):
|
||||||
SELECT max(created_at) AS max_created_at, page_id FROM
|
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
|
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
|
) 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)
|
last_edits = list(last_edits)
|
||||||
page_keys = [pr.page.pk for pr in last_edits]
|
page_keys = [pr.page.pk for pr in last_edits]
|
||||||
specific_pages = Page.objects.filter(pk__in=page_keys).specific()
|
specific_pages = Page.objects.filter(pk__in=page_keys).specific()
|
||||||
|
|
Ładowanie…
Reference in New Issue