mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-15 10:13:15 -05:00
Make number of list items per page configurable
This commit is contained in:
parent
e6526d3fd4
commit
3c08fa9b33
@ -105,3 +105,6 @@ PAPERLESS_SHARED_SECRET=""
|
|||||||
# Override the default UTC time zone here
|
# Override the default UTC time zone here
|
||||||
#PAPERLESS_TIME_ZONE=America/Los_Angeles
|
#PAPERLESS_TIME_ZONE=America/Los_Angeles
|
||||||
|
|
||||||
|
# Customize number of list items to show per page
|
||||||
|
#PAPERLESS_LIST_PER_PAGE=50
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ class DocumentAdmin(admin.ModelAdmin):
|
|||||||
list_display = ("created", "title", "thumbnail", "correspondent", "tags_")
|
list_display = ("created", "title", "thumbnail", "correspondent", "tags_")
|
||||||
list_filter = ("tags", "correspondent", MonthListFilter)
|
list_filter = ("tags", "correspondent", MonthListFilter)
|
||||||
ordering = ["-created", "correspondent"]
|
ordering = ["-created", "correspondent"]
|
||||||
list_per_page = 25
|
|
||||||
|
|
||||||
def created_(self, obj):
|
def created_(self, obj):
|
||||||
return obj.created.date().strftime("%Y-%m-%d")
|
return obj.created.date().strftime("%Y-%m-%d")
|
||||||
|
@ -61,10 +61,11 @@ INSTALLED_APPS = [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
_list_per_page = int(os.getenv("PAPERLESS_LIST_PER_PAGE", 25))
|
||||||
SUIT_CONFIG = {
|
SUIT_CONFIG = {
|
||||||
'ADMIN_NAME': 'Paperless',
|
'ADMIN_NAME': 'Paperless',
|
||||||
'SEARCH_URL': '',
|
'SEARCH_URL': '',
|
||||||
'LIST_PER_PAGE': 100,
|
'LIST_PER_PAGE': _list_per_page,
|
||||||
'HEADER_DATE_FORMAT': 'D m-d-Y',
|
'HEADER_DATE_FORMAT': 'D m-d-Y',
|
||||||
'MENU': (
|
'MENU': (
|
||||||
'sites',
|
'sites',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user