wrolpi/modules/zim
lrnselfreliance 3ea8eb81f6
Model reprs read only loaded state (#819)
A repr runs inside log calls. Reading a relationship or an expired column there runs a query, and
on an object whose session is gone it raises DetachedInstanceError instead of logging. Archive's
repr also stat'ed its SingleFile file on disk.

`wrolpi.common.loaded()` follows attributes through state that is already loaded (primary keys
from the identity key) and never runs SQL. Every model repr uses it; with everything loaded the
output is unchanged, except Video and Archive now show the FileGroup's primary path.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:47:32 -06:00
..
test Rename skip_circleci to skip_ci (#797) 2026-10-08 17:28:13 -06:00
__init__.py Zim/Kiwix (Wikipedia) feature 2023-07-10 21:30:40 -06:00
api.py db: one request-scoped database handle per API request (#773) 2026-10-03 15:42:06 -06:00
conftest.py Using aria2c to download files. Removing custom file download functions. 2025-01-10 11:32:37 -07:00
downloader.py Migrating Kiwix downloaders. 2026-05-07 15:54:53 -06:00
errors.py Adding toggle to Channel page to stop downloading comments for certain channels. 2025-03-01 18:23:29 -07:00
kiwix.py Adding Khan Academy to zim subscriptions. Updating some kiwix catalog sizes. 2025-03-03 16:32:35 -07:00
lib.py db: serializers read only loaded data (#777) 2026-10-04 18:28:08 -06:00
models.py Model reprs read only loaded state (#819) 2026-10-11 16:47:32 -06:00
schema.py Adding feature which adds toggles to Zim files to enable/disable auto search. 2025-02-02 12:43:04 -07:00