mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
Restores the compression of static files for x86_64 (#6627)
This commit is contained in:
parent
6ea25a96a3
commit
d3ff0ff8e0
@ -7,6 +7,7 @@ import re
|
|||||||
import tempfile
|
import tempfile
|
||||||
from os import PathLike
|
from os import PathLike
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from platform import machine
|
||||||
from typing import Final
|
from typing import Final
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from typing import Union
|
from typing import Union
|
||||||
@ -370,7 +371,10 @@ ASGI_APPLICATION = "paperless.asgi.application"
|
|||||||
STATIC_URL = os.getenv("PAPERLESS_STATIC_URL", BASE_URL + "static/")
|
STATIC_URL = os.getenv("PAPERLESS_STATIC_URL", BASE_URL + "static/")
|
||||||
WHITENOISE_STATIC_PREFIX = "/static/"
|
WHITENOISE_STATIC_PREFIX = "/static/"
|
||||||
|
|
||||||
_static_backend = "django.contrib.staticfiles.storage.StaticFilesStorage"
|
if machine().lower() == "aarch64": # pragma: no cover
|
||||||
|
_static_backend = "django.contrib.staticfiles.storage.StaticFilesStorage"
|
||||||
|
else:
|
||||||
|
_static_backend = "whitenoise.storage.CompressedStaticFilesStorage"
|
||||||
|
|
||||||
STORAGES = {
|
STORAGES = {
|
||||||
"staticfiles": {
|
"staticfiles": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user