From 7a00172abfbaccfa3d27b6aea3a6467f7896d95b Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Mon, 5 Sep 2011 09:09:07 +0100 Subject: [PATCH] Force sorting on the employment history section --- app/eve_api/templates/eve_api/character.html | 4 ++-- app/eve_api/views.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/eve_api/templates/eve_api/character.html b/app/eve_api/templates/eve_api/character.html index 2a8cfdb..57225ea 100644 --- a/app/eve_api/templates/eve_api/character.html +++ b/app/eve_api/templates/eve_api/character.html @@ -80,13 +80,13 @@ - {% if character.employmenthistory.count %} + {% if employmenthistory.count %}

Employment History

- {% for hist in character.employmenthistory.all %} + {% for hist in employmenthistory %} {% endfor %}
CorporationJoin DateLeave Date
{{ hist.corporation.name }}{{ hist.start_date }}{% if hist.end_date %}{{ hist.end_date }}{% endif %}
diff --git a/app/eve_api/views.py b/app/eve_api/views.py index 9626bac..e04533d 100644 --- a/app/eve_api/views.py +++ b/app/eve_api/views.py @@ -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,