paperless-ngx/src/paperless/views.py

21 lines
581 B
Python
Raw Normal View History

import os
from django.http import HttpResponse
from django.views.generic import View
from rest_framework.pagination import PageNumberPagination
class StandardPagination(PageNumberPagination):
page_size = 25
2020-10-21 12:16:25 +02:00
page_size_query_param = "page_size"
max_page_size = 100000
class FaviconView(View):
def get(self, request, *args, **kwargs):
favicon = os.path.join(
2022-02-27 15:26:41 +01:00
os.path.dirname(__file__), "static", "paperless", "img", "favicon.ico"
)
with open(favicon, "rb") as f:
return HttpResponse(f, content_type="image/x-icon")