Letting Readers Correct Any Part of a Record, Not Just the Verses
The correction form only accepted lyrics and tags, on a library where much of the text was read off a scan by machine. Widening it meant storing only what actually differs, not a full copy of the record.
Given how much of this library's text passed through OCR, a shattered-PDF reassembly, or a machine translation before a human ever saw it, the correction form was strangely narrow: readers could propose a fix to the lyrics or the tags, and nothing else. The title, the native-script title, the poet's name, the language, the transliteration, the translation — all of it could be wrong, none of it could be reported.
Reader submits any field, or just a note. Only what differs is stored; the rest is inferred from the record it corrects.
Widening the form without widening what gets stored
The obvious naive fix — add every field to the Suggestion model, store a full copy of the record on every submission — would have made the review inbox unreadable. An editor reviewing a correction needs to see what changed, not re-diff an entire record by eye. So the form prefills every field from the current record, and only fields that actually differ from the original are persisted:
# core/views.py (paraphrased from the diff)
for field in CORRECTABLE_FIELDS:
submitted = normalize_line_endings(form.cleaned_data[field])
current = normalize_line_endings(getattr(qasida, field, ''))
if submitted != current:
setattr(suggestion, field, submitted)The normalize_line_endings step is there for an unglamorous but real reason: a browser submits <textarea> content with CRLF line endings, while the database holds LF. Skip that normalization and every prefilled field reads as "edited" the instant a reader touches the page, because the line-ending bytes differ even when not a single character of the poem changed. That would defeat the entire point of storing only the diff.
A correction can be nothing but a complaint
Not every reader who spots a problem knows the fix. The form accepts a free-text note on its own — "a reader who can see that a line is missing should not have to supply the line" — so a correction can be pure signal ("this transliteration looks wrong around verse 4") with no proposed replacement at all. That's a real design choice: it trades a bit of moderation overhead for not silently discouraging the reports that matter most, which are often the ones from someone who noticed something is off but can't fix it themselves.
The review inbox has to show both sides
A correction is meaningless without the value it would replace — "change the poet to X" tells an editor nothing if they can't see what it's replacing it with. The suggestion inbox template renders each proposed field beside the current value, and the admin list column says which parts of a record each submission touches, so a reviewer can triage by scanning column labels before opening anything.
Translation gets a third provenance state
The subtlest change in this feature isn't about the form at all — it's about what happens after a translation correction is accepted. The page warns readers when a translation was machine-generated and may be inaccurate. If a reader corrects that translation and the warning stays, the page is now lying in the opposite direction: claiming machine uncertainty about text a person vouched for. So translation_origin gained a third value beyond source and machine — a human-corrected state — and the warning is keyed off it directly. It's a small schema change that exists entirely to keep one sentence on the page honest.
Series: Qasida App.