danirus / django-comments-xtd

A pluggable Django comments application with thread support, follow-up notifications, mail confirmation, like/dislike flags, moderation, a ReactJS plugin and Bootstrap 5.3.
https://django-comments-xtd.readthedocs.io
BSD 2-Clause "Simplified" License
594 stars 158 forks source link

Update form.html #231

Closed DashDot7 closed 3 years ago

DashDot7 commented 3 years ago

The inbuilt User model in django uses username as a variable in order to store user's name instead of get_full_name

danirus commented 3 years ago

Thanks for contributing, however it's correct to use get_full_name in the form.

When listing comments, the name of the person that posted a comment comes from comment.name, you can see that in a few templates like comment_tree.html or comment.html. Using comment.name is resolved here in django-comments. See that the getter uses either get_full_name or the name stored in the name field of the comment instance.

To prevent displaying an empty name when listing comments the form.html template requests the user to fill the name field even if the user is authenticated but has an empty user.get_full_name().

DashDot7 commented 3 years ago

My point is danirus that if the user in authenticated he/she doesn't need to be asked to enter username because the username should automatically be received from database. Thanks for response BTW.

danirus commented 3 years ago

I answered to your last comment already in my previous comment. Thanks for contributing.