Skip to content

Commit 6da95d7

Browse files
author
=
committed
Rename [html/json]_index to _priority
1 parent 6008cb6 commit 6da95d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphene_django/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,10 @@ def request_wants_html(cls, request):
283283
accepted_length = len(accepted)
284284
#the list will be ordered in preferred first - so we have to make
285285
#sure the most preferred gets the highest number
286-
html_index = accepted_length - accepted.index('text/html') if 'text/html' in accepted else 0
287-
json_index = accepted_length - accepted.index('application/json') if 'application/json' in accepted else 0
286+
html_priority = accepted_length - accepted.index('text/html') if 'text/html' in accepted else 0
287+
json_priority = accepted_length - accepted.index('application/json') if 'application/json' in accepted else 0
288288

289-
return html_index > json_index
289+
return html_priority > json_priority
290290

291291
@staticmethod
292292
def get_graphql_params(request, data):

0 commit comments

Comments
 (0)