Skip to content

fix(admin): render boolean fields under wtforms 3.2#2

Merged
galuszkm merged 1 commit into
mainfrom
fix/mg/wtforms-3.2
Jul 2, 2026
Merged

fix(admin): render boolean fields under wtforms 3.2#2
galuszkm merged 1 commit into
mainfrom
fix/mg/wtforms-3.2

Conversation

@galuszkm

@galuszkm galuszkm commented Jul 2, 2026

Copy link
Copy Markdown
Member

Description

wtforms 3.2 removed the validation_attrs attribute from the base Input widget and moved it onto each concrete subclass. sqladmin's BooleanInputWidget subclasses widgets.Input directly and never defines its own validation_attrs, so under wtforms 3.2 the render path if k in self.validation_attrs raises AttributeError

This PR patches this issue.

Related Issues

N/A

Type of Change

  • Bug fix

Testing

How have you tested the change?

  • I ran uv run just check (lint + type check)
  • I ran uv run just test for overall testing
  • I added or updated tests that prove my fix is effective or my feature works
  • I verified existing examples in examples/ still work

Checklist

  • I have read the CONTRIBUTING document
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- shim missing validation_attrs on sqladmin BooleanInputWidget
@galuszkm galuszkm merged commit 42c5bba into main Jul 2, 2026
8 checks passed
@galuszkm galuszkm deleted the fix/mg/wtforms-3.2 branch July 2, 2026 01:00
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.

1 participant