File tree 2 files changed +2
-8
lines changed
2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,7 @@ class HomeHandler(RequestHandler):
9
9
def get (self , ** kwargs ):
10
10
json = request .is_xhr or request .args .get ('json' , '' )
11
11
12
- if json :
13
- response = Response (mimetype = 'application/json' )
14
- else :
15
- response = Response (mimetype = 'text/html' )
12
+ response = Response (mimetype = 'application/json' if json else 'text/html' )
16
13
17
14
collection = FilterCollection (filters , request , response )
18
15
Original file line number Diff line number Diff line change @@ -12,10 +12,7 @@ class RandomQuoteHandler(RequestHandler):
12
12
def get (self , ** kwargs ):
13
13
json = request .is_xhr or request .args .get ('json' , '' )
14
14
15
- if json :
16
- response = Response (mimetype = 'application/json' )
17
- else :
18
- response = Response (mimetype = 'text/html' )
15
+ response = Response (mimetype = 'application/json' if json else 'text/html' )
19
16
20
17
collection = FilterCollection (filters , request , response )
21
18
You can’t perform that action at this time.
0 commit comments