mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Merge remote-tracking branch 'upstream/dev' into feature/remote-user
This commit is contained in:
@@ -6,6 +6,8 @@ import re
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# Tap paperless.conf if it's available
|
||||
if os.path.exists("../paperless.conf"):
|
||||
load_dotenv("../paperless.conf")
|
||||
@@ -87,6 +89,7 @@ INSTALLED_APPS = [
|
||||
"documents.apps.DocumentsConfig",
|
||||
"paperless_tesseract.apps.PaperlessTesseractConfig",
|
||||
"paperless_text.apps.PaperlessTextConfig",
|
||||
"paperless_tika.apps.PaperlessTikaConfig",
|
||||
"paperless_mail.apps.PaperlessMailConfig",
|
||||
|
||||
"django.contrib.admin",
|
||||
@@ -124,6 +127,7 @@ MIDDLEWARE = [
|
||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
@@ -253,6 +257,15 @@ if os.getenv("PAPERLESS_DBHOST"):
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
LANGUAGES = [
|
||||
("en-us", _("English")),
|
||||
("de", _("German"))
|
||||
]
|
||||
|
||||
LOCALE_PATHS = [
|
||||
os.path.join(BASE_DIR, "locale")
|
||||
]
|
||||
|
||||
TIME_ZONE = os.getenv("PAPERLESS_TIME_ZONE", "UTC")
|
||||
|
||||
USE_I18N = True
|
||||
@@ -431,3 +444,10 @@ for t in json.loads(os.getenv("PAPERLESS_FILENAME_PARSE_TRANSFORMS", "[]")):
|
||||
PAPERLESS_FILENAME_FORMAT = os.getenv("PAPERLESS_FILENAME_FORMAT")
|
||||
|
||||
THUMBNAIL_FONT_NAME = os.getenv("PAPERLESS_THUMBNAIL_FONT_NAME", "/usr/share/fonts/liberation/LiberationSerif-Regular.ttf")
|
||||
|
||||
# Tika settings
|
||||
PAPERLESS_TIKA_ENABLED = __get_boolean("PAPERLESS_TIKA_ENABLED", "NO")
|
||||
PAPERLESS_TIKA_ENDPOINT = os.getenv("PAPERLESS_TIKA_ENDPOINT", "http://localhost:9998")
|
||||
PAPERLESS_TIKA_GOTENBERG_ENDPOINT = os.getenv(
|
||||
"PAPERLESS_TIKA_GOTENBERG_ENDPOINT", "http://localhost:3000"
|
||||
)
|
||||
|
@@ -7,6 +7,8 @@ from django.views.generic import RedirectView
|
||||
from rest_framework.authtoken import views
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from documents.views import (
|
||||
CorrespondentViewSet,
|
||||
DocumentViewSet,
|
||||
@@ -88,7 +90,8 @@ urlpatterns = [
|
||||
|
||||
# Frontend assets TODO: this is pretty bad, but it works.
|
||||
path('assets/<path:path>',
|
||||
RedirectView.as_view(url='/static/frontend/assets/%(path)s')),
|
||||
RedirectView.as_view(url='/static/frontend/en-US/assets/%(path)s')),
|
||||
# TODO: with localization, this is even worse! :/
|
||||
|
||||
# login, logout
|
||||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
@@ -102,4 +105,4 @@ admin.site.site_header = 'Paperless-ng'
|
||||
# Text at the end of each page's <title>.
|
||||
admin.site.site_title = 'Paperless-ng'
|
||||
# Text at the top of the admin index page.
|
||||
admin.site.index_title = 'Paperless-ng administration'
|
||||
admin.site.index_title = _('Paperless-ng administration')
|
||||
|
@@ -1 +1 @@
|
||||
__version__ = (0, 9, 10)
|
||||
__version__ = (0, 9, 11)
|
||||
|
Reference in New Issue
Block a user