From 75ce3c8943c29d9589514dc280d7fff7ede3fad3 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 29 Oct 2010 12:44:57 +0100 Subject: [PATCH] Refreshing your API key on your profile now uses a ajax request. --- media/img/spinner.gif | Bin 0 -> 673 bytes sso/views.py | 1 - templates/sso/profile.html | 18 ++++++++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 media/img/spinner.gif diff --git a/media/img/spinner.gif b/media/img/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0bce1542342e912da81a2c260562df172f30d73 GIT binary patch literal 673 zcmZ?wbhEHb6krfw_{6~Q|Nnmm28Kh24mmkF0U1e2Nli^nlO|14{Lk&@8WQa67~pE8 zXTZz|lvDgC+Z`3#dv5h=E26FfcG1 zbL_hF&)}42ws10s6^G;;cE1^EoUR)U5A70}d2pLv!jVIT7j&Z~EblI3x0K*v_sV|m z0kj3v921Z^em#l`(k(o@H$3ZdDRc@9NidXDNbqrumReCGv$gd8+e8WW28HVqkJ_9i zH>s*<31KtHjANIPvi2#*6BEu%3Dak5O_t&NBI)H?V$TxT}#l{vOTn5naXTfF^&~Hhq+NX@#Ccc>y7T?;vjI&jdhsDsPJyAw*m0Qz>i}K7# zL9w50Ng{fT}A5JUe8lRK1h7_Y2;BWJDd=c6f&i?Wv5(5q?6|P zQw{>maxZP<537OA37Uk}7@%_$4o$EWe_Zl>&#id|lE-BpDC#+Fn|msJ%_2h{Hg1vP z#N8WAzfWasG}yq|xqE)DrWaOofX=z|?*pgc%{ig5vl!pqDlC|q&~Z0$&Rvsft&VO- z4MZj+%-+Vx%W}v;V76hyp=;+R;x+~t^Q%*xuFTQAF2})fSfTHDAs>sO!OBw`)&)o$ c0!CNZt))x~rAZP^^P&YOFfdqy5)K#u0POD40{{R3 literal 0 HcmV?d00001 diff --git a/sso/views.py b/sso/views.py index 65df491..8a5ab36 100644 --- a/sso/views.py +++ b/sso/views.py @@ -107,7 +107,6 @@ def eveapi_refresh(request, userid=0): import_eve_account(acc.api_key, acc.api_user_id, force_cache=True) request.user.get_profile().update_access() - print request.GET if request.is_ajax(): acc = EVEAccount.objects.get(id=userid) return HttpResponse(serializers.serialize('json', [acc]), mimetype='application/javascript') diff --git a/templates/sso/profile.html b/templates/sso/profile.html index ec4276a..c3822e6 100644 --- a/templates/sso/profile.html +++ b/templates/sso/profile.html @@ -6,6 +6,19 @@ {% block content %} + + + +

Your Profile

@@ -72,8 +85,9 @@ setup.

{{ acc.description }} {{ acc.get_api_keytype_display }} {{ acc.get_api_status_display }} - {{ acc.api_last_updated|naturaltimediff }} - Refresh,  + {{ acc.api_last_updated|naturaltimediff }} + Refresh (AJAX),  + RefreshLogsDelete