adding link to update tokens
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
{% if rower.rojabo_token is not None and rower.rojabo_token != '' %}
|
||||
Rojabo
|
||||
{% endif %}
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
{% if form.errors %}
|
||||
@@ -44,13 +44,13 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="Save">
|
||||
</form>
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="Save">
|
||||
</form>
|
||||
</p>
|
||||
{% if rower.garmintoken and rower.garmintoken != '' %}
|
||||
<p>
|
||||
@@ -78,18 +78,21 @@
|
||||
<p><a href="/rowers/me/nkauthorize/"><img src="/static/img/NKLiNKLogbook.png" alt="connect with NK Logbook" width="120"></a></p>
|
||||
<p><a href="/rowers/me/sporttracksauthorize/"><img src="/static/img/sporttracks-button.png" alt="connect with SportTracks" width="120"></a></p>
|
||||
<p><a href="/rowers/me/polarauthorize/"><img src="/static/img/Polar_connectwith_btn_white.png"
|
||||
alt="connect with Polar" width="130"></a></p>
|
||||
alt="connect with Polar" width="130"></a></p>
|
||||
<p><a href="/rowers/me/tpauthorize/"><img src="/static/img/TP_logo_horz_2_color.png"
|
||||
alt="connect with Polar" width="130"></a></p>
|
||||
alt="connect with Polar" width="130"></a></p>
|
||||
|
||||
<p><a href="/rowers/me/garminauthorize"><img src="/static/img/garmin_badge_130.png"
|
||||
alt="connect with Garmin" width="130"></a></p>
|
||||
alt="connect with Garmin" width="130"></a></p>
|
||||
<p><a href="/rowers/me/rp3authorize"><img src="/static/img/logo-rp3-full-black.png"
|
||||
alt="connect with RP3" width="130"></a></p>
|
||||
<p><a href="/rowers/me/rojaboauthorize"><img src="/static/img/rojabo.png"
|
||||
alt="connect with Rojabo" width="130"></a></p>
|
||||
|
||||
|
||||
alt="connect with RP3" width="130"></a></p>
|
||||
<p><a href="/rowers/me/rojaboauthorize"><img src="/static/img/rojabo.png"
|
||||
alt="connect with Rojabo" width="130"></a></p>
|
||||
{% if user.is_staff %}
|
||||
<p><a href="/rowers/me/fakturoidauthorize/"><img src="https://www.fakturoid.cz/images/svg/fakturoid-logo.svg" width="120"></a></p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
|
||||
@@ -66,7 +66,6 @@ def rower_process_fakturoidcallback(request):
|
||||
t.refresh_token = result['refresh_token']
|
||||
t.expires_in = result['expires_in']
|
||||
t.save()
|
||||
print(t)
|
||||
except FakturoidToken.DoesNotExist:
|
||||
t = FakturoidToken(
|
||||
access_token = result['access_token'],
|
||||
@@ -74,9 +73,14 @@ def rower_process_fakturoidcallback(request):
|
||||
expires_in = result['expires_in'],
|
||||
)
|
||||
t.save()
|
||||
print(t)
|
||||
messages.info(request,"Token refreshed and stored")
|
||||
else:
|
||||
messages.error(request,"Error")
|
||||
|
||||
return HttpResponse('succes')
|
||||
url = reverse('rower_exportsettings_view')
|
||||
|
||||
|
||||
return HttpResponseRedirect(url)
|
||||
|
||||
@csrf_exempt
|
||||
def braintree_webhook_view(request):
|
||||
|
||||
Reference in New Issue
Block a user