Skip to content

Instantly share code, notes, and snippets.

@ChristinaMeno
Forked from toastdriven/tastypie_digest.py
Created June 27, 2011 19:55
Show Gist options
  • Save ChristinaMeno/1049676 to your computer and use it in GitHub Desktop.
Save ChristinaMeno/1049676 to your computer and use it in GitHub Desktop.
# Change this to match your user.
username = 'daniel'
from tastypie.models import ApiKey
from django.contrib.auth.models import User
my_user = User.objects.get(username=username)
key, created = ApiKey.objects.get_or_create(user=my_user)
# Now use key.key for the digest password.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment