Added support for token authentication (with test).

This commit is contained in:
Chris Church
2013-04-10 00:41:51 -04:00
parent 09cca99c69
commit 9dbbf330e8
6 changed files with 62 additions and 2 deletions

View File

@@ -26,10 +26,18 @@ from rest_framework import generics
from rest_framework import permissions
from rest_framework.response import Response
from rest_framework import status
from rest_framework.settings import api_settings
from rest_framework.authtoken.views import ObtainAuthToken
import exceptions
import datetime
from base_views import *
class AuthTokenView(ObtainAuthToken):
renderer_classes = api_settings.DEFAULT_RENDERER_CLASSES
# FIXME: Show a better form for HTML view
# FIXME: How to make this view discoverable?
class OrganizationsList(BaseList):
model = Organization