Skip to content

Support native Excel types for method and read-only fields - #167

Open
Fire162 wants to merge 3 commits into
django-commons:mainfrom
Fire162:fix-method-field-types
Open

Fire162 wants to merge 3 commits into
django-commons:mainfrom
Fire162:fix-method-field-types

Conversation

@Fire162

@Fire162 Fire162 commented Nov 7, 2026

Copy link
Copy Markdown

Preserve native Excel cell types (numbers, booleans, dates) for SerializerMethodField, ReadOnlyField, and untyped fields rather than falling back to text strings.

Fixes #79

@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
drf_excel/fields.py 100.00% <100.00%> (ø)
drf_excel/renderers.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Fire162
Fire162 force-pushed the fix-method-field-types branch from 5e07c06 to 5be8db8 Compare November 7, 2026 19:21
Comment thread drf_excel/fields.py Resolved
Comment thread drf_excel/fields.py Resolved
Comment thread drf_excel/fields.py Resolved
Combine datetime and time tzinfo stripping into a single union check, and simplify number and date prep_cell format branches.
Comment thread tests/test_fields.py Resolved

This branch has not been deployed

No deployments
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.

Types are not recognized in methods

3 participants