Opened 14 years ago
Closed 12 years ago
#14175 closed Bug (wontfix)
Comment object's user_name field too short for User.get_full_name
Reported by: | gravm | Owned by: | nobody |
---|---|---|---|
Component: | contrib.comments | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
[9118] introduced a bug where a comment can't be saved because User.get_full_name() returns a name that's more than 50 characters (the limit set by the Comment model). By default, User.first_name and User.last_name both allow up to 30 characters. User.get_full_name() returns the concatenation of first_name and last_name with a space in between, so it's possible for that method to return a 61 character string. On possible fix is to change the Comment.user_name field to allow 61 characters.
Attachments (2)
Change History (9)
by , 14 years ago
Attachment: | comments.diff added |
---|
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 14 years ago
Attachment: | 14175_comment_long_full_name.diff added |
---|
comment:2 by , 14 years ago
If we are to keep using the full name, then I think the best approach is to augment the character limit to 61 (see patch). However, this would be backwards incompatible...
comment:3 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:4 by , 13 years ago
Easy pickings: | unset |
---|---|
milestone: | → 2.0 |
UI/UX: | unset |
Since the change is backwards-compatible, pushing the milestone to 2.0.
comment:6 by , 13 years ago
Patch needs improvement: | set |
---|
Once migration tools are added to django core, some migration scripts should be included in this patch.
comment:7 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
django.contrib.comments
has been deprecated and is no longer supported, so I'm closing this ticket. We're encouraging users to transition to a custom solution, or to a hosted solution like Disqus.
The code itself has moved to https://github.com/django/django-contrib-comments; if you want to keep using it, you could move this bug over there.
Either that or the return value of get_full_name() would have to be truncated.