diff --git a/src/postorius/templates/postorius/user_mailmansettings.html b/src/postorius/templates/postorius/user_mailmansettings.html
index 89f4ea4..0a1508a 100644
--- a/src/postorius/templates/postorius/user_mailmansettings.html
+++ b/src/postorius/templates/postorius/user_mailmansettings.html
@@ -4,26 +4,38 @@
{% block main %}
{% include 'postorius/menu/user_nav.html' %}
-
{% trans 'Mailman Settings' %} - {{ user }}
+ {% if nolists %}
+ No Preferences Available
+ {% trans 'You are not yet subscribed to any lists, so have no Mailman preferences.' %}
+ {% else %}
+
+ {% trans 'Mailman Settings' %} - {{ user }}
Mailman display name: {{ mm_user.display_name}}
Django email: {{ user.email }}
Mailman primary email: {{ mm_user.email }}
Valid email addresses for this account:
+
{% for address in mm_user.addresses %}
- {{ address }}
{% endfor %}
+
Preferences:
- {{ mm_user.preferences }}
- {{ mm_user }}
+ preferences: {{ mm_user.preferences }}
+
user: {{ mm_user }}
+
tko
+
memberships: {{ membership_lists }}
{% for pref in mm_user.preferences %}
{{ pref }}
{% endfor %}
List memberships:
+ {% for list in mm_user.lists %}
+ {{ list.name }}
+ {% endfor %}
Sample output: not real
- list1@example.com [listinfo]
@@ -93,5 +105,7 @@
+ {% endif %}
+
{% endblock main %}
~
diff --git a/src/postorius/views/list.py b/src/postorius/views/list.py
index 6cfecd8..44b14a8 100644
--- a/src/postorius/views/list.py
+++ b/src/postorius/views/list.py
@@ -541,6 +541,15 @@
the_user = MailmanUser.objects.get(address=request.user.email)
except MailmanApiError:
return utils.render_api_error(request)
+ except Mailman404Error:
+ # If we have no settings, return a "blank" settings page telling the
+ # user that they have no settings because they are not subscribed
+ # to any lists (see mailmansettings template)
+ return render_to_response(
+ 'postorius/user_mailmansettings.html',
+ {'nolists': 'true'},
+ context_instance=RequestContext(request),
+ )
settingsform = MembershipSettings()
return render_to_response('postorius/user_mailmansettings.html',