I'm trying to customize django_comments
app (github repo, docs).
The default get_form_target()
returns django_comments.views.post_comment
, which is a function-based view. post_comment()
, in turn, returns a HttpRedirectResponse
to the value of next
(if specified) or to a default confirmation page.
See default post_comment() implementation here.
I need to add a couple lines of logic to the post_comment()
. Can I override it to where it still does the default implementation, but with the extra logic? I could just copy the original code and modify it, but it feels like a lot of code duplication for just adding a couple lines of custom logic.