mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Fix account lookup, also show accounts on the charlist
This commit is contained in:
@@ -69,7 +69,7 @@ class EVEPlayerCharacter(EVEAPIModel):
|
||||
return None
|
||||
|
||||
@property
|
||||
def account(self)
|
||||
def account(self):
|
||||
if self.eveaccount_set.count():
|
||||
return self.eveaccount_set.all()[0]
|
||||
return None
|
||||
|
||||
@@ -5,15 +5,21 @@
|
||||
<h1>Character List</h1>
|
||||
|
||||
{% if characters %}
|
||||
|
||||
{% regroup characters by account as acc_list %}
|
||||
|
||||
<table>
|
||||
<tr><th>Character Name</th><th>Corporation</th><th>Alliance</th><th>Training</th></tr>
|
||||
{% for char in characters %}
|
||||
{% for acc in acc_list %}
|
||||
<tr><th colspan=4>Account {{ acc.grouper }}</th></tr>
|
||||
{% for char in acc.list %}
|
||||
<tr><td><a href="{% url eveapi-character char.id %}">{{ char.name }}</a></td>
|
||||
<td><a href="{% url eveapi-corporation char.corporation.id %}">{{ char.corporation }}</a></td>
|
||||
<td>{% if char.corporation.alliance %}{{ char.corporation.alliance }}{% endif %}</td>
|
||||
<td>{% if char.current_training %}{{ char.current_training.skill.name }} to Level {{ char.current_training.in_training }}{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user