From 4bc00222fe314adfda86acc2e74c0524ee5f68c5 Mon Sep 17 00:00:00 2001 From: vsdudakov Date: Mon, 2 Dec 2024 14:25:50 +0300 Subject: [PATCH] Added new setting to configure CROP and bump packages. Enhance doc and examples --- docs/build.py | 6 + docs/index.html | 7 +- examples/django_djangoorm/poetry.lock | 76 +- examples/django_djangoorm/pyproject.toml | 2 +- examples/fastapi_ponyorm/poetry.lock | 961 +++++++------ examples/fastapi_ponyorm/pyproject.toml | 2 +- examples/fastapi_sqlalchemy/example.py | 1 + examples/fastapi_sqlalchemy/models.py | 1 + examples/fastapi_sqlalchemy/poetry.lock | 1198 +++++++++-------- examples/fastapi_sqlalchemy/pyproject.toml | 2 +- examples/fastapi_tortoiseorm/poetry.lock | 1003 +++++++------- examples/fastapi_tortoiseorm/pyproject.toml | 2 +- fastadmin/api/service.py | 2 + fastadmin/models/schemas.py | 1 + fastadmin/settings.py | 3 + fastadmin/static/assets/worker-C151k0-L.js | 13 + fastadmin/static/index.min.js | 351 ++--- frontend/.eslintrc.cjs | 4 - .../src/components/upload-input/index.tsx | 23 +- frontend/src/interfaces/configuration.ts | 1 + frontend/src/providers.tsx | 4 +- .../providers/ConfigurationProvider/index.tsx | 68 +- .../ConfigurationProvider/provider.tsx | 59 + .../providers/SignInUserProvider/index.tsx | 34 - .../providers/SignInUserProvider/provider.tsx | 37 + frontend/yarn.lock | 986 +++++++------- pyproject.toml | 2 +- 27 files changed, 2490 insertions(+), 2359 deletions(-) create mode 100644 fastadmin/static/assets/worker-C151k0-L.js create mode 100644 frontend/src/providers/ConfigurationProvider/provider.tsx create mode 100644 frontend/src/providers/SignInUserProvider/provider.tsx diff --git a/docs/build.py b/docs/build.py index 93602df..14972f7 100644 --- a/docs/build.py +++ b/docs/build.py @@ -39,6 +39,12 @@ def read_cls_docstring(cls): def get_versions(): return [ + { + "version": "0.2.16", + "changes": [ + "Added new setting ADMIN_DISABLE_CROP_IMAGE. So,we can configure crop images on upload.", + ], + }, { "version": "0.2.15", "changes": [ diff --git a/docs/index.html b/docs/index.html index ff841e8..1b9069f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,7 +2,7 @@
  • - -->

    FastAdmin | Documentation

    • Created: 7 March 2023
    • Updated: 20 November 2024

    Introduction

    FastAdmin is an easy-to-use Admin Dashboard App for FastAPI/Django/Flask inspired by Django Admin.

    FastAdmin was built with relations in mind and admiration for the excellent and popular Django Admin. It's engraved in its design that you may configure your admin dashboard for FastAPI/Django/Flask easiest way.

    FastAdmin is designed to be minimalistic, functional and yet familiar.


    Getting Started

    If you have any questions that are beyond the scope of the documentation, Please feel free to email us.

    Installation

    Follow the steps below to setup FastAdmin:

    Install the package using pip:

    Note: For zsh and macos use: pip install fastadmin[fastapi,django]

    +              -->  

    FastAdmin | Documentation

    • Created: 7 March 2023
    • Updated: 02 December 2024

    Introduction

    FastAdmin is an easy-to-use Admin Dashboard App for FastAPI/Django/Flask inspired by Django Admin.

    FastAdmin was built with relations in mind and admiration for the excellent and popular Django Admin. It's engraved in its design that you may configure your admin dashboard for FastAPI/Django/Flask easiest way.

    FastAdmin is designed to be minimalistic, functional and yet familiar.


    Getting Started

    If you have any questions that are beyond the scope of the documentation, Please feel free to email us.

    Installation

    Follow the steps below to setup FastAdmin:

    Install the package using pip:

    Note: For zsh and macos use: pip install fastadmin[fastapi,django]

       
     
     pip install fastadmin[fastapi,django]  # for fastapi with django orm
    @@ -283,6 +283,9 @@
         # or attackers could use it to generate their own signed values.
         ADMIN_SECRET_KEY: str = os.getenv("ADMIN_SECRET_KEY")
     
    +    # This value disables the crop image feature in FastAdmin.
    +    ADMIN_DISABLE_CROP_IMAGE: bool = os.getenv("ADMIN_DISABLE_CROP_IMAGE", False)
    +
       
     

    Note: Settings without default values are required.


    Dashboard Widget Admins

    Registering Widgets

    Register Dashboard widgets

       
    @@ -1301,7 +1304,7 @@
         min_num: int = 1
     
       
    -

    Changelog

    See what's new added, changed, fixed, improved or updated in the latest versions.

    v0.2.15

    Fix password logic for user.

    v0.2.14

    Make permissions functions awaitable. Bump frontend/backend packages.

    v0.2.13

    Fix edit page frontend issue for Date field.

    v0.2.12

    Remove python-dotenv dep. Bump django. Add django example.

    v0.2.11

    Fixes for examples. Fixes for Pony ORM (delete, update m2m). Allow sorting by custom columns. Fix for list_display ordering.

    v0.2.10

    Fix issue empty m2m. Optimisation on unit tests. Fix for pony orm. Optimisation on search for tortoise orm.

    v0.2.9

    Fix issue with modal inline dialogs. Fix issue with m2m multiple select.

    v0.2.8

    Fix sqlalchemy delete functionality. Add more examples.

    v0.2.7

    Fix helpers function. Add regexps.

    v0.2.6

    Add edit btn for async select.

    v0.2.5

    Fix for async select in inlines.

    v0.2.4

    Fix dashboard widgets and auto register inlines.

    v0.2.3

    Fix filters issue on lists. Remove jinja from dependencies.

    v0.2.2

    Fix bugs with datetime.

    v0.2.1

    Update packages. Fix linters and tests in vite frontend. Removed pydantic from dependencies.

    v0.2.0

    Update packages. Use vite instead obsolete react-scripts.