drop python2 support, upgrade to django 3
This commit is contained in:
parent
80390a1f9b
commit
844382b1e8
124 changed files with 413 additions and 563 deletions
|
|
@ -3,7 +3,7 @@ from __future__ import division, absolute_import
|
|||
|
||||
import json
|
||||
|
||||
from django.shortcuts import render_to_response
|
||||
from django.shortcuts import render
|
||||
from django.conf import settings
|
||||
|
||||
from ..shortcuts import render_to_json_response, json_response, HttpErrorJson
|
||||
|
|
@ -31,7 +31,7 @@ def api(request):
|
|||
'settings': settings,
|
||||
'sitename': settings.SITENAME
|
||||
}
|
||||
response = render_to_response('api.html', context)
|
||||
response = render(request, 'api.html', context)
|
||||
response['Access-Control-Allow-Origin'] = '*'
|
||||
return response
|
||||
if request.META.get('CONTENT_TYPE') == 'application/json':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue