django-comments-xtd icon indicating copy to clipboard operation
django-comments-xtd copied to clipboard

Names while posting comments

Open jondaqs opened this issue 3 months ago • 3 comments

Shouldn't the name of the user posting the comment if logged in, not pick from the username without allowing user to show a field to enter the name?

jondaqs avatar Sep 17 '25 03:09 jondaqs

Maybe :-) I need to check that running the code. I will be back later today.

danirus avatar Sep 17 '25 06:09 danirus

Hi @jondaqs, do you mean the situation in which a registered user is sending a comment and the field name is shown in the form, am I correct? In such a situation the field name is only displayed if the get_full_name method of the user returns empty: forms.py:L20.

You could overwrite that behaviour providing your own comments/form.html.

The idea behind is that the name of the person that is sending the comment has to have a value. When displaying the list of comments, if the comment was sent by a registered user that had an empty name field, the comment would display without a name.

danirus avatar Sep 18 '25 10:09 danirus

Hello Danirus,

Thank you for your reply and the good work. Yes, am referring to that name scenario, I'll add the get user name to the user model and see how it behaves.

Regards,

On Thu, 18 Sept 2025, 13:22 Daniela Rus Morales, @.***> wrote:

danirus left a comment (danirus/django-comments-xtd#472) https://github.com/danirus/django-comments-xtd/issues/472#issuecomment-3306676971

Hi @jondaqs https://github.com/jondaqs, do you mean the situation in which a registered user is sending a comment and the field name is shown in the form, am I correct? In such a situation the field name is only displayed if the get_full_name method of the user returns empty: forms.py:L20 https://github.com/danirus/django-comments-xtd/blob/master/django_comments_xtd/templates/comments/form.html#L20 .

You could overwrite that behaviour providing your own comments/form.html.

The idea behind is that the name of the person that is sending the comment has to have a value. When displaying the list of comments, if the comment was sent by a registered user that had an empty name field, the comment would display without a name.

— Reply to this email directly, view it on GitHub https://github.com/danirus/django-comments-xtd/issues/472#issuecomment-3306676971, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMDBHYHX4K6COZV26VDV733TKBWBAVCNFSM6AAAAACGW2VBTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMBWGY3TMOJXGE . You are receiving this because you were mentioned.Message ID: @.***>

jondaqs avatar Sep 18 '25 11:09 jondaqs