We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
python manage.py shell
from rest_framework.authtoken.models import Token
from django.contrib.auth.models import User
u = User.objects.get(username='<username>')
token = Token.objects.create(user=u)
print(token.key)