This is how I want commenting to work on my site:
- if the user is logged in, they are presented with an "add comments" box which has a text field for the comment text, and a checkbox that will post the comment anonymously if checked
- if the user is not logged in, it will present the user with everything above, plus an extra text field where they can enter a display name.
SO basically if the user is logged in they can ither comment anonymously or with their username. If they aren't logged in, they can either post anonymously or they can make up a name on the spot for display purposes only.
How can I go about doing this? I already have the template set up which presents the user with the appropriate textboxes and checkboxes depending on their logged in status.
I thought about a wrapper function around django.contrib.comments.views.post_comment
, but that view only takes a request object, which is immutable. How would you go about this?