修改源码模板路径
This commit is contained in:
1 parent
89c42dac85
commit
f5bca2428b
44 files changed
+3
-3
No files matched your search
+1
-1
@@ -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:
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@ ROOT_URLCONF = 'oj.urls'
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [os.path.join(BASE_DIR, 'template')],
|
||||
'DIRS': [os.path.join(BASE_DIR, 'template/src')],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
@@ -116,7 +116,7 @@ STATIC_URL = '/static/'
|
||||
STATICFILES_DIRS = (os.path.join(BASE_DIR, "static/src/"),)
|
||||
|
||||
TEMPLATE_DIRS = (
|
||||
os.path.join(BASE_DIR, "template"),
|
||||
os.path.join(BASE_DIR, "template/src"),
|
||||
)
|
||||
|
||||
AUTH_USER_MODEL = 'account.User'
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user