Show alliance on the character list

This commit is contained in:
2010-10-13 11:45:12 +01:00
parent 3e75201e9d
commit b6c9f96d60
2 changed files with 3 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ def characters(request, charid=0):
for acc in eveaccounts:
chars = acc.characters.all()
for char in chars:
characters.append({'id': char.id, 'name': char.name, 'corp': char.corporation.name})
characters.append({'id': char.id, 'name': char.name, 'corp': char.corporation })
except EVEAccount.DoesNotExist:
characters = []

View File

@@ -6,10 +6,11 @@
{% if characters %}
<table>
<tr><th>Character Name</th><th>Corp</th></tr>
<tr><th>Character Name</th><th>Corporation</th><th>Alliance</th></tr>
{% for char in characters %}
<tr><td><a href="{% url sso.views.characters char.id %}">{{ char.name }}</a></td>
<td>{{ char.corp }}</td>
<td>{% if char.corp.alliance %}{{ char.corp.alliance }}{% endif %}</td>
</tr>
{% endfor %}
</table>