Force sorting on the employment history section

This commit is contained in:
2011-09-05 09:09:07 +01:00
parent 6daa4b7049
commit 7a00172abf
2 changed files with 4 additions and 2 deletions

View File

@@ -80,13 +80,13 @@
</table>
</div>
{% if character.employmenthistory.count %}
{% if employmenthistory.count %}
<div class="character_employmenthistory">
<h2>Employment History</h2>
<table>
<tr><th>Corporation</th><th>Join Date</th><th>Leave Date</th></tr>
{% for hist in character.employmenthistory.all %}
{% for hist in employmenthistory %}
<tr><td><a href="{% url eveapi-corporation hist.corporation.id %}">{{ hist.corporation.name }}</a></td><td>{{ hist.start_date }}</td><td>{% if hist.end_date %}{{ hist.end_date }}{% endif %}</td></tr>
{% endfor %}
</table>

View File

@@ -173,6 +173,8 @@ def eveapi_character(request, charid=None, template='eve_api/character.html', li
skillTree[-1][0] += skill.skillpoints
skillTree[-1][2].append(skill)
employmenthistory = character.employmenthistory.all().order_by('-record_id')
context = {
'character': character,
'current_training': current_training,