mirror of
https://github.com/Labelbase/Labelbase.git
synced 2026-08-14 12:43:22 +02:00
17 lines
472 B
Python
17 lines
472 B
Python
from django.views.generic import TemplateView
|
|
from rest_framework.authtoken.models import Token
|
|
|
|
|
|
class ProfileView(TemplateView):
|
|
""" """
|
|
template_name = "profile.html"
|
|
|
|
|
|
class APIKeyView(TemplateView):
|
|
""" """
|
|
template_name = "apikey.html"
|
|
|
|
def get_context_data(self, **kwargs):
|
|
context = super(APIKeyView, self).get_context_data(**kwargs)
|
|
context["api_token"] = Token.objects.get(user_id=self.request.user.id)
|
|
return context
|