File tree 1 file changed +11
-8
lines changed 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -31,28 +31,31 @@ class UserViewSet(viewsets.ViewSet):
31
31
@method_decorator (cache_page(60 * 60 * 2 ))
32
32
@method_decorator (vary_on_cookie)
33
33
def list (self , request , format = None ):
34
- content = {" user_feed" : request.user.get_user_feed()}
34
+ content = {
35
+ " user_feed" : request.user.get_user_feed(),
36
+ }
35
37
return Response(content)
36
38
37
39
38
40
class ProfileView (APIView ):
39
41
# With auth: cache requested url for each user for 2 hours
40
42
@method_decorator (cache_page(60 * 60 * 2 ))
41
- @method_decorator (
42
- vary_on_headers(
43
- " Authorization" ,
44
- )
45
- )
43
+ @method_decorator (vary_on_headers(" Authorization" ))
46
44
def get (self , request , format = None ):
47
- content = {" user_feed" : request.user.get_user_feed()}
45
+ content = {
46
+ " user_feed" : request.user.get_user_feed(),
47
+ }
48
48
return Response(content)
49
49
50
50
51
51
class PostView (APIView ):
52
52
# Cache page for the requested url
53
53
@method_decorator (cache_page(60 * 60 * 2 ))
54
54
def get (self , request , format = None ):
55
- content = {" title" : " Post title" , " body" : " Post content" }
55
+ content = {
56
+ " title" : " Post title" ,
57
+ " body" : " Post content" ,
58
+ }
56
59
return Response(content)
57
60
```
58
61
You can’t perform that action at this time.
0 commit comments