Use get_type_display for profiles.

This commit is contained in:
Emanuel Schuetze 2011-09-21 21:01:56 +02:00
parent d70219e757
commit e09388fd6e
2 changed files with 2 additions and 6 deletions

View File

@ -56,11 +56,7 @@
<td>{{ user.first_name }}</td>
<td>{{ user.last_name }}</td>
<td>{{ user.profile.group }}</td>
<td>{% if user.profile.type == "delegate" %}{% trans "Delegate" %}{% endif %}
{% if user.profile.type == "observer" %}{% trans "Observer" %}{% endif %}
{% if user.profile.type == "staff" %}{% trans "Staff" %}{% endif %}
{% if user.profile.type == "guest" %}{% trans "Guest" %}{% endif %}
</td>
<td>{{ user.profile.get_type_display }}</td>
<td>{{ user.profile.committee }}</td>
{% if perms.participant.can_manage_participant %}
<td>{{ user.username }}</td>

View File

@ -271,7 +271,7 @@ def print_userlist(request):
Paragraph(user.last_name, stylesheet['Tablecell']),
Paragraph(user.first_name, stylesheet['Tablecell']),
Paragraph(user.profile.group, stylesheet['Tablecell']),
Paragraph(user.profile.type, stylesheet['Tablecell']),
Paragraph(user.profile.get_type_display(), stylesheet['Tablecell']),
Paragraph(user.profile.committee, stylesheet['Tablecell']),
])
except Profile.DoesNotExist: