修改源码模板路径

This commit is contained in:
virusdefender
2015-08-25 16:18:24 +08:00
parent 89c42dac85
commit f5bca2428b
44 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ from rest_framework.views import APIView
class AdminTemplateView(APIView):
def get(self, request, template_dir, template_name):
path = settings.TEMPLATE_DIRS[0] + "/admin/" + template_dir + "/" + template_name + ".html"
path = settings.TEMPLATES[0]["DIRS"][0] + "/admin/" + template_dir + "/" + template_name + ".html"
try:
return HttpResponse(open(path).read(), content_type="text/html")
except IOError: