Andrew-liu / my_blog_tutorial

It's the example of the development of blog by Django and Pure.
382 stars 206 forks source link

Django 1.8环境下文中的配置文件有些内容需要修改 #13

Closed wizard1990 closed 8 years ago

wizard1990 commented 8 years ago

设置bootstrap以及本地template路径的时候 settings.py中的相关内容应该是: TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [TEMPLATE_PATH], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.request' ], }, }, ] 原文中是: from django.conf import global_settings TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( 'django.core.context_processors.request', ) 在Django 1.8下会报错

Andrew-liu commented 8 years ago

@wizard1990 不好意思, 本文已经声明了基于的版本是1.7.1 并没有做1.8的适配