Skip to content

Instantly share code, notes, and snippets.

@bohde
Created December 24, 2010 15:17
Show Gist options
  • Save bohde/754329 to your computer and use it in GitHub Desktop.
Save bohde/754329 to your computer and use it in GitHub Desktop.
Django based auth for Tastypie
from tastypie.authentication import Authentication
class DjangoAuthentication(Authentication):
"""Authenticate based upon Django session"""
def is_authenticated(self, request, **kwargs):
return request.user.is_authenticated()
@tvaughan
Copy link

Awesome. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment