Basic func for Comments and Notifications implemented on this branch.
Nested comments based on django-treebread package (Materialized Path trees), django templates and htmx for crud on comments.
Inspired this
Flow
List of comments available on post detail page for all users.
Loading this page activates htmx 'load' trigger. As a result get request fetches list of comments.They are rendered in a div class "comms" on the same post detail page. (The same flow happens when list of comments gets updated: trigger == "updateCommList")
Post detailed page renders a CommentForm only for authenticated users.
List of comments gets rendered recursively via custom template tag recursetree that expects comments collection. (Something like mptt)
Authenticated comment authors can edit and delete their comments via bootstrap5 modal.
Deleted comment is rendered as an empty card (UI) but still present in db for the sake of tree nodes consistency.
[ ] Feedback: handle custom exception (HtmxFailure) and it's testing
Basic func for Comments and Notifications implemented on this branch. Nested comments based on django-treebread package (Materialized Path trees), django templates and htmx for crud on comments. Inspired this Flow List of comments available on post detail page for all users. Loading this page activates htmx 'load' trigger. As a result get request fetches list of comments.They are rendered in a div class "comms" on the same post detail page. (The same flow happens when list of comments gets updated: trigger == "updateCommList") Post detailed page renders a CommentForm only for authenticated users. List of comments gets rendered recursively via custom template tag recursetree that expects comments collection. (Something like mptt) Authenticated comment authors can edit and delete their comments via bootstrap5 modal. Deleted comment is rendered as an empty card (UI) but still present in db for the sake of tree nodes consistency.