From 115e61be0900b3d5dd93ff84f20629311aceff9f Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Tue, 9 Oct 2012 12:01:17 +0100 Subject: Added quickstart guide --- rest_framework/decorators.py | 3 ++- rest_framework/templates/rest_framework/base.html | 2 +- rest_framework/urlpatterns.py | 25 +++++++++++++++++++++-- 3 files changed, 26 insertions(+), 4 deletions(-) (limited to 'rest_framework') diff --git a/rest_framework/decorators.py b/rest_framework/decorators.py index 2adbff24..948973ae 100644 --- a/rest_framework/decorators.py +++ b/rest_framework/decorators.py @@ -13,7 +13,8 @@ def api_view(http_method_names): class WrappedAPIView(APIView): pass - WrappedAPIView.http_method_names = [method.lower() for method in http_method_names] + allowed_methods = set(http_method_names) | set(('options',)) + WrappedAPIView.http_method_names = [method.lower() for method in allowed_methods] def handler(self, *args, **kwargs): return func(*args, **kwargs) diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index f213554b..abf3672f 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -39,7 +39,7 @@ {% if user.is_authenticated %}