mirror of
https://github.com/Labelbase/Labelbase.git
synced 2026-08-17 13:07:28 +02:00
.
This commit is contained in:
parent
cdc23acb6a
commit
de318e7e18
2 changed files with 11 additions and 1 deletions
|
|
@ -8,5 +8,8 @@
|
|||
<h2 style="padding-top: 1em;">Profile</h2>
|
||||
|
||||
|
||||
|
||||
<h3>API Key</h3>
|
||||
<p>
|
||||
<tt>{{ api_token }}</tt>
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
from django.shortcuts import render
|
||||
from django.views.generic import TemplateView # FormView,
|
||||
from rest_framework.authtoken.models import Token
|
||||
|
||||
class ProfileView(TemplateView):
|
||||
""" """
|
||||
template_name = 'profile.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ProfileView, self).get_context_data(**kwargs)
|
||||
context['api_token'] = Token.objects.get(user_id=self.request.user.id)
|
||||
return context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue