Names while posting 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?
Maybe :-) I need to check that running the code. I will be back later today.
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.
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: @.***>