Opened 8 years ago

Closed 8 years ago

#15841 closed Bug (needsinfo)

User model conflicts with CommentDetailsForm

Reported by: admin@… Owned by: nobody
Component: contrib.comments Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description defined as "blank = True", but is required. This results violation of form validation when authorized user without email posts comment.

Change History (2)

comment:1 Changed 8 years ago by admin@…

Summary: User conflict with CommentDetailsFormUser model conflicts with CommentDetailsForm

comment:2 Changed 8 years ago by Aymeric Augustin

Easy pickings: unset
Resolution: needsinfo
Status: newclosed

By design, CommentDetailsForm requires an email address. As a direct consequence, so does CommentForm. Many people rely on this behavior and it should not be changed lightly.

If this is an issue for you, you can subclass CommentDetailsForm and set blank=True for the email field.

As far as I can tell, when a user is logged in and posts a comment without filling in his details, django.contrib.comments.views.comments.post_comment will add them based on the user's profile. However, this is not documented. Since a user without an email in his profile can always give it in the comments form, I don't think there's a bug.

Please provide more information on how to reproduce your issue if this answer is not satisfying.

Note: See TracTickets for help on using tickets.
Back to Top