修复部分代码风格的问题

This commit is contained in:
virusdefender committed 2016-04-30 19:27:20 +08:00
1 parent 1a5dadbbd5
commit 66d1aa69f0
4 files changed
+7 -15

No files matched your search

+2 -1
View File
@@ -1,4 +1,5 @@
# coding=utf-8
import os
from django.conf import settings
from django.http import HttpResponse, Http404
@@ -7,7 +8,7 @@ from rest_framework.views import APIView
class AdminTemplateView(APIView):
def get(self, request, template_dir, template_name):
path = settings.TEMPLATES[0]["DIRS"][0] + "/admin/" + template_dir + "/" + template_name + ".html"
path = os.path.join(settings.TEMPLATES[0]["DIRS"][0], "admin", template_dir, template_name + ".html")
try:
return HttpResponse(open(path).read(), content_type="text/html")
except IOError: