Skip to content
Snippets Groups Projects
Commit d9cccc7b authored by Jonathan Seguin's avatar Jonathan Seguin
Browse files

Add trans blocks to api page

parent 874ea720
No related branches found
No related tags found
1 merge request!68Resolve "Implement pubkey à la gitlab/github (ou simple token), pour permettre un accès sans fournir son mot de passe"
......@@ -6,19 +6,19 @@
<div class="col">
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<h4 class="alert-heading">{% trans 'Warning' %}!</h4>
<p>This token enables authentication to IRIC Data. Do not share this token!</p>
<p>{% trans 'This token enables authentication to IRIC Data. Do not share this token!' %}</p>
</div>
<p>API Token :</p>
<p>{% trans 'API Token' %} :</p>
<div class="col-8 alert alert-dark">
<pre class='mb-0'><code><h5 class='mb-0'>{{user.profile.api_token}}</h5></code></pre>
</div>
<p>
Use this token to authenticate your API calls by inserting it in the request header with the key 'token'.
{% trans 'Use this token to authenticate your API calls by inserting it in the "Authorization" request header with the key "Token".' %}
Ex.
</p>
<div class="col-9 alert alert-secondary">
<div class="col-10 alert alert-secondary">
<pre class='mb-0'><code>import requests
url = 'http://localhost:8000/api/v1/my-datasets/list/json/'
headers = {'Authorization': 'Token {{user.profile.api_token}}'}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment