Show diplay_name in a list
Hello,
I'm trying to figure out how to show the display_name of a member in postorius in Members > Subscriber.
I was trying to add {{ member.diplay_name }} in the template ${postorius}/templates/postorius/lists/members.html
Here an abstract of where I inserted the code:
[...] {% for member in members %} <tr> {% if role == 'subscriber' %} <td> <label class="checkbox-inline"> <input type="checkbox" class="member-checkbox" name="choices" id="id_choices_{{ forloop.counter0 }}" value="{{ member.email }}" /> {{ member.display_name }} <{{ member.email }}> </label> [...]
I could not figure out why it wouldn't work.
I'm running mailman3 Version 3.1.1-9 on an Ubuntu 18.04.
Any idea what I was missing there?
Thanks in advance for any help.
- Ruben
On 9/29/19 2:29 PM, ruben@bkonrad.de wrote:
Hello,
I'm trying to figure out how to show the display_name of a member in postorius in Members > Subscriber.
What Postorius version is this? Since 1.2.3, this is called Users -> Members. Also, since 1.2, Postorius has had this feature. See <https://gitlab.com/mailman/postorius/commit/7a6b6cba30f4da38e1c140e16a8cb62fae03f7ea#49c6795f47768815c5f1d616313ccb892b44ddee_78_84>
Any idea what I was missing there?
Often, member.display_name doesn't exist or is "None".
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Any idea what I was missing there? Often, member.display_name doesn't exist or is "None". This seems to also be the problem that I submitted a while back (6 months ago?) that the notification to the moderator of subscription requests, which should include both display name and email address of
On 9/29/19 5:59 PM, Mark Sapiro wrote: the requestor, only has the email address. We've been trying to track the problem down in code but it keeps going deeper and deeper...
-- Joel Lord Web Administrator, Alpha Psi Omega Grand Cast etc... etc... etc...
On Mon, Sep 30, 2019, at 6:33 AM, Joel Lord wrote:
Any idea what I was missing there? Often, member.display_name doesn't exist or is "None". This seems to also be the problem that I submitted a while back (6 months ago?) that the notification to the moderator of subscription requests, which should include both display name and email address of
On 9/29/19 5:59 PM, Mark Sapiro wrote: the requestor, only has the email address. We've been trying to track the problem down in code but it keeps going deeper and deeper...
This should be the UI trying to unconditionally convert a Python object to string. Name string transforms correctly, but since the absence of a name is denoted by a None object (as opposed to an empty string ''), the renderer mindlessly converts it to "None".
It could be fixed with a simple
{% if member.display_name is not None %}{{ member.display_name }}{% endif %}
in the right place in the Django template.
-- Joel Lord Web Administrator, Alpha Psi Omega Grand Cast etc... etc... etc...
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
I couldn't fix it until now, but seems I'm on the right way.
Probably I'll ditch the Ubuntu packages and reinstall it from Github, since the issue is already solved there.
Thank you very much for your help.
Ruben
participants (4)
-
Abhilash Raj
-
Joel Lord
-
Mark Sapiro
-
ruben@bkonrad.de