aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorGreg Kempe2015-02-04 16:26:23 +0200
committerGreg Kempe2015-02-04 16:26:23 +0200
commite13d2af1374c8a2b2146e1126d9406bfb4bbd9ec (patch)
tree372d8d6e69d76b0ba88a89af73cdbdce9e619632 /rest_framework
parentd920683237bd2eb17d110a80fc09708a67340f01 (diff)
downloaddjango-rest-framework-e13d2af1374c8a2b2146e1126d9406bfb4bbd9ec.tar.bz2
Parens around if clause
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/decorators.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rest_framework/decorators.py b/rest_framework/decorators.py
index 7604eae1..21de1acf 100644
--- a/rest_framework/decorators.py
+++ b/rest_framework/decorators.py
@@ -18,7 +18,7 @@ def api_view(http_method_names=None):
Decorator that converts a function-based view into an APIView subclass.
Takes a list of allowed methods for the view as an argument.
"""
- http_method_names = ['GET'] if http_method_names is None else http_method_names
+ http_method_names = ['GET'] if (http_method_names is None) else http_method_names
def decorator(func):
@@ -112,7 +112,7 @@ def detail_route(methods=None, **kwargs):
"""
Used to mark a method on a ViewSet that should be routed for detail requests.
"""
- methods = ['get'] if methods is None else methods
+ methods = ['get'] if (methods is None) else methods
def decorator(func):
func.bind_to_methods = methods
@@ -126,7 +126,7 @@ def list_route(methods=None, **kwargs):
"""
Used to mark a method on a ViewSet that should be routed for list requests.
"""
- methods = ['get'] if methods is None else methods
+ methods = ['get'] if (methods is None) else methods
def decorator(func):
func.bind_to_methods = methods