I\'m working on a project to enable the django rest framework authentication for mobile devices. I\'m using the default token authentication for get the user token from a po
from rest_framework.authtoken.models import Token
from django.contrib.auth.models import User
u = User.objects.get(username='admin')
token = Token.objects.create(user=u)
print token.key