Opened 14 years ago
Closed 14 years ago
#15841 closed Bug (needsinfo)
User model conflicts with CommentDetailsForm
Reported by: | 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
User.email defined as "blank = True", but CommentDetailsForm.email is required. This results violation of form validation when authorized user without email posts comment.
Change History (2)
comment:1 by , 14 years ago
Summary: | User conflict with CommentDetailsForm → User model conflicts with CommentDetailsForm |
---|
comment:2 by , 14 years ago
Easy pickings: | unset |
---|---|
Resolution: | → needsinfo |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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.