fastadmin 0.2.15__py3-none-any.whl → 0.2.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fastadmin/api/service.py +2 -0
- fastadmin/models/schemas.py +1 -0
- fastadmin/settings.py +3 -0
- fastadmin/static/assets/worker-C151k0-L.js +13 -0
- fastadmin/static/index.min.js +176 -175
- {fastadmin-0.2.15.dist-info → fastadmin-0.2.16.dist-info}/METADATA +1 -1
- {fastadmin-0.2.15.dist-info → fastadmin-0.2.16.dist-info}/RECORD +9 -8
- {fastadmin-0.2.15.dist-info → fastadmin-0.2.16.dist-info}/LICENSE +0 -0
- {fastadmin-0.2.15.dist-info → fastadmin-0.2.16.dist-info}/WHEEL +0 -0
fastadmin/api/service.py
CHANGED
@@ -460,6 +460,7 @@ class ApiService:
|
|
460
460
|
username_field=settings.ADMIN_USER_MODEL_USERNAME_FIELD,
|
461
461
|
date_format=settings.ADMIN_DATE_FORMAT,
|
462
462
|
datetime_format=settings.ADMIN_DATETIME_FORMAT,
|
463
|
+
disable_crop_image=settings.ADMIN_DISABLE_CROP_IMAGE,
|
463
464
|
models=[],
|
464
465
|
dashboard_widgets=[],
|
465
466
|
)
|
@@ -476,6 +477,7 @@ class ApiService:
|
|
476
477
|
username_field=settings.ADMIN_USER_MODEL_USERNAME_FIELD,
|
477
478
|
date_format=settings.ADMIN_DATE_FORMAT,
|
478
479
|
datetime_format=settings.ADMIN_DATETIME_FORMAT,
|
480
|
+
disable_crop_image=settings.ADMIN_DISABLE_CROP_IMAGE,
|
479
481
|
models=models,
|
480
482
|
dashboard_widgets=dashboard_widgets,
|
481
483
|
) # type: ignore [call-arg]
|
fastadmin/models/schemas.py
CHANGED
fastadmin/settings.py
CHANGED
@@ -50,5 +50,8 @@ class Settings:
|
|
50
50
|
# or attackers could use it to generate their own signed values.
|
51
51
|
ADMIN_SECRET_KEY: str = os.getenv("ADMIN_SECRET_KEY")
|
52
52
|
|
53
|
+
# This value disables the crop image feature in FastAdmin.
|
54
|
+
ADMIN_DISABLE_CROP_IMAGE: bool = os.getenv("ADMIN_DISABLE_CROP_IMAGE", False)
|
55
|
+
|
53
56
|
|
54
57
|
settings = Settings()
|