Skip to content

django-modelsheet 0.3.0

Choose a tag to compare

@svalench svalench released this 25 Oct 10:43
· 1 commit to main since this release

First stable release of django-modelsheet, bringing spreadsheet editing, Decimal formulas and previewed bulk operations to Django Admin.

What's new

  • Enable sheets by registering ModelSheetAdmin; a settings model list is no longer required. MODELSHEET["models"] remains available as an optional restriction.
  • Discover role models from enabled Admin registrations, including custom Admin sites.
  • Parse bulk formulas once per plan and cache query aggregates, preserving formula limits and lazy evaluation.

Fixes and data integrity

  • String primary keys such as __proto__ and constructor now retain edits through undo, redo and save without modifying JavaScript prototypes.
  • Preview deadlines are fixed when preparation completes. Cancel/resume cannot extend an expired deadline, and empty plans retain their frozen membership.
  • Bulk previews reject rows hidden by object permissions before calculating aggregates.
  • Idempotent preview retries return the existing plan even when the original view snapshot has expired or been removed.
  • Editing and navigation are locked during save/load. Structural changes invalidate previews, and stale asynchronous responses cannot replace the current plan.

Install or upgrade

python -m pip install --upgrade django-modelsheet==0.3.0
python manage.py migrate
python manage.py collectstatic --noinput

Back up the database and pause writes/background workers before upgrading; restart the application/workers and reload browser tabs afterwards. Compiled JavaScript and CSS are included: installation does not require Node.js or a CDN.

Migration 0002_operation_preview_expires_at is required. It preserves history, snapshots and operation items, but conservatively expires legacy unconfirmed previews. Create a new preview before confirmation. Already confirmed operations retain their resume behavior.

Compatibility and validation

  • Django 5.2 with Python 3.11–3.14; Django 6.0 and 6.1 with Python 3.12–3.14.
  • SQLite, PostgreSQL and MySQL/InnoDB. SQLite writes require transaction_mode="IMMEDIATE".
  • 188 Python tests, 75 frontend unit tests, 23 Admin browser scenarios and 3 playground scenarios.
  • All 16 Python/Django/database combinations passed for this release commit, along with browser tests, strict documentation, package checks and upgrade from 0.3.0a2. Publishing workflow completed successfully.

Scope

Creating/deleting records stays in standard Admin. FK/M2M editors, server undo, file import/export, persistent formulas and multi-database operation are not included. Large background operations require a project-provided adapter.

Documentation · Upgrade notes and limitations · Full changelog

The wheel and source archive attached to this release match the files published on PyPI. Checksums are provided in SHA256SUMS.

Post-publication verification passed in a fresh Python 3.13 virtualenv installed directly from PyPI with Django 6.1.2: pip check, Django system checks, migrations (including 0002), packaged templates and collectstatic. No system-site packages or repository imports were used.