Skip to content

Bring the latest changes from master into this datrangepicker patch - #1

Open
schutt wants to merge 1022 commits into
schutt:update_daterangepickerfrom
pallets-eco:master
Open

Bring the latest changes from master into this datrangepicker patch#1
schutt wants to merge 1022 commits into
schutt:update_daterangepickerfrom
pallets-eco:master

Conversation

@schutt

@schutt schutt commented May 18, 2021

Copy link
Copy Markdown
Owner

No description provided.

samuelhwilliams and others added 30 commits August 27, 2025 21:40
* mypy 3.13 for examples
* remove types-Flask, types-Flask-SQLAlchemy
---------
Co-authored-by: ElLorans <lorenzo.cerreta@gmail.com>
update with bootstrap daterangepicker
pymongo: add pymongo.view.ModelView.get_query()
- now by setting `category_icon_classes` on Admin object it will show the icon properly and it is no longer duplicated
- now we can set  css classes for `category_icon_classes` parameter in `Admin()`.
- also we can set `menu_class_name` in `ModelView()`
- also we can set `class_name` in `MenuLink()`
 Support for Mongoengine in V2.0
samialfattani and others added 30 commits May 14, 2026 12:33
Bumps [idna](https://github.com/kjd/idna) from 3.13 to 3.15.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](kjd/idna@v3.13...v3.15)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.15'
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.6.3...2.7.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.7.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

* fix(sqla): coerce ARRAY element type in `conv_ARRAY` (closes #1724)

`AdminModelConverter.conv_ARRAY` returned a `Select2TagsField` with no
`coerce` callable, so every submitted value was cast via the default
`text_type` and the resulting Python list was always `list[str]`. For a
Postgres `ARRAY(Integer)` column that round-trip fails on save with

    column "x" is of type integer[] but expression is of type text[]

(reported in #1724 in 2018 and still reproducible on `master` as of
v2.2.0; the long-standing workaround in that thread is to subclass
`Select2TagsField` and override `process_formdata` to call `int()` on
each entry).

---------

Co-authored-by: ElLorans <lorenzo.cerreta@gmail.com>
Bumps [uv](https://github.com/astral-sh/uv) from 0.11.8 to 0.11.15.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](astral-sh/uv@0.11.8...0.11.15)

---
updated-dependencies:
- dependency-name: uv
  dependency-version: 0.11.15
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…hub-actions group (#2913)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
…2918)

* fix(mongoengine): set Content-Disposition on api_file_view downloads (#2916)

The GridFS download endpoint at ``/admin/<view>/api/file/`` previously
returned only ``Content-Type`` and ``Content-Length`` headers. Browsers
therefore named saved files after the URL's last path segment (``file``)
instead of using the original filename stored in GridFS.

Switch to ``flask.send_file`` with ``download_name=data.filename`` and
``as_attachment=False`` so the response carries
``Content-Disposition: inline; filename="<original>"`` — preserving the
existing inline-render behavior while giving the browser a correct name
to use on save. ``send_file`` also handles RFC 6266 encoding of
non-ASCII filenames and supports ``Range`` requests, which the
handcrafted ``Response`` did not.

Original report and fix by @bekab95 in #2036. That PR bundled this
change with an unrelated ``DBRef`` fix; #2036 has been closed in favour
of two focused issues (#2916, #2917) and this PR addresses the first.

Co-authored-by: bekab95 <17232189+bekab95@users.noreply.github.com>

* Update doc/changelog.rst

Co-authored-by: ElLorans <lorenzo.cerreta@gmail.com>

---------

Co-authored-by: bekab95 <17232189+bekab95@users.noreply.github.com>
Co-authored-by: ElLorans <lorenzo.cerreta@gmail.com>
* invert sorting arrows in list view

---------

Co-authored-by: ElLorans <lorenzo.cerreta@gmail.com>
…id input (#2922)

* fix(filters): BaseTimeBetweenFilter.validate() returns False on invalid input

The except ValueError block erroneously re-raised the exception instead of
returning False, causing a 500 error on malformed time range input.
BaseDateBetweenFilter and BaseDateTimeBetweenFilter already handle this
correctly. Add a test covering the invalid-input cases.
---------
Co-authored-by: Noethix55555 <277300782+Noethix55555@users.noreply.github.com>
Co-authored-by: ElLorans <lorenzo.cerreta@gmail.com>
…mat (#2919)

* fix(mongoengine): handle unresolved DBRef in QueryAjaxModelLoader.format (#2917)

When MongoEngine cannot dereference a ``ReferenceField`` (target document
deleted, or the reference points to a different collection / database),
it returns a raw ``bson.dbref.DBRef`` instead of a ``Document``. ``DBRef``
has no ``.pk`` attribute, so the AJAX endpoint backing the admin
autocomplete widget crashed with ``AttributeError`` — surfaced as HTTP
500 from ``/admin/<view>/ajax/lookup/`` and made the edit form unusable
until the broken reference was cleaned up directly in the database.

``format`` now detects ``DBRef`` and returns
``(str(dbref.id), "(missing: <collection>/<id>)")`` so the widget
displays a clear marker the user can clear, instead of raising. The
posted-back id is the underlying ``ObjectId`` (not the ``DBRef``'s
``repr``), so submitting the form does not write an unresolvable value.

Original report and fix by @bekab95 in #2036. That PR bundled this
change with an unrelated ``Content-Disposition`` fix; #2036 has been
closed in favour of two focused issues (#2916, #2917) and this PR
addresses the second.

Co-authored-by: bekab95 <17232189+bekab95@users.noreply.github.com>

* style: ruff-format QueryAjaxModelLoader.format signature

* Update doc/changelog.rst

Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com>

* Fix style

---------

Co-authored-by: bekab95 <17232189+bekab95@users.noreply.github.com>
Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
* Remove pin to Azurite by passing command: azurite --skipApiVersionCheck --blobHost 0.0.0.0 to docker compose (see Support service version 2026-02-06 Azure/Azurite#2623). Official docs specifically say that when using customized Docker parameters, --blobHost 0.0.0.0 is required so the service accepts connections from outside the container
* Upgrade all dependencies
* Fix type errors raised by mypy
* Minor refactor on peewee tests for typing purposes
* Refactor flask_admin.tests.peeweemodel.test_basic that has now 3 validators and not only 2 (char limit on CharField) to test duplication of Regexp validator rather than implementation detail
…ather than AdminIndexView, allowing e.g. FileAdmin (#2949)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.